patch 9.1.0538: not possible to assign priority when defining a sign
Problem: not possible to assign priority when defining a sign
(Mathias Fußenegger)
Solution: Add the priority argument for the :sign-define ex command and
the sign_define() function (LemonBoy)
Use the specified value instead of the default one (SIGN_DEF_PRIO) when
no priority is explicitly specified in sign_place or :sign place.
fixes: #8334
closes: #15124
Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
25ac6d67d9
commit
b975ddfdf9
@ -1,4 +1,4 @@
|
||||
*sign.txt* For Vim version 9.1. Last change: 2024 Jun 08
|
||||
*sign.txt* For Vim version 9.1. Last change: 2024 Jul 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
@ -80,8 +80,9 @@ used by popup windows where 'cursorline' is set.
|
||||
*sign-priority*
|
||||
Each placed sign is assigned a priority value. When multiple signs are placed
|
||||
on the same line, the attributes of the sign with the highest priority is used
|
||||
independently of the sign group. The default priority for a sign is 10. The
|
||||
priority is assigned at the time of placing a sign.
|
||||
independently of the sign group. The default priority for a sign is 10, this
|
||||
value can be changed for different signs by specifying a different value at
|
||||
definition time. The priority is assigned at the time of placing a sign.
|
||||
|
||||
When two signs with the same priority are present, and one has an icon or text
|
||||
in the signcolumn while the other has line highlighting, then both are
|
||||
@ -135,6 +136,8 @@ See |sign_define()| for the equivalent Vim script function.
|
||||
Motif pixmap (.xpm)
|
||||
Win32 .bmp, .ico, .cur
|
||||
pixmap (.xpm) |+xpm_w32|
|
||||
priority={prio}
|
||||
Default priority for the sign, see |sign-priority|.
|
||||
|
||||
linehl={group}
|
||||
Highlighting group used for the whole line the sign is placed
|
||||
@ -209,11 +212,11 @@ See |sign_place()| for the equivalent Vim script function.
|
||||
|
||||
By default, the sign is placed in the global sign group.
|
||||
|
||||
By default, the sign is assigned a default priority of 10. To
|
||||
assign a different priority value, use "priority={prio}" to
|
||||
specify a value. The priority is used to determine the sign
|
||||
that is displayed when multiple signs are placed on the same
|
||||
line.
|
||||
By default, the sign is assigned a default priority of 10,
|
||||
unless specified otherwise by the sign definition. To assign a
|
||||
different priority value, use "priority={prio}" to specify a
|
||||
value. The priority is used to determine the sign that is
|
||||
displayed when multiple signs are placed on the same line.
|
||||
|
||||
Examples: >
|
||||
:sign place 5 line=3 name=sign1 file=a.py
|
||||
@ -453,6 +456,7 @@ sign_getdefined([{name}]) *sign_getdefined()*
|
||||
linehl highlight group used for the whole line the
|
||||
sign is placed in; not present if not set
|
||||
name name of the sign
|
||||
priority default priority value of the sign
|
||||
numhl highlight group used for the line number where
|
||||
the sign is placed; not present if not set
|
||||
text text that is displayed when there is no icon
|
||||
@ -646,7 +650,8 @@ sign_placelist({list}) *sign_placelist()*
|
||||
priority Priority of the sign. When multiple signs are
|
||||
placed on a line, the sign with the highest
|
||||
priority is used. If not specified, the
|
||||
default value of 10 is used. See
|
||||
default value of 10 is used, unless specified
|
||||
otherwise by the sign definition. See
|
||||
|sign-priority| for more information.
|
||||
|
||||
If {id} refers to an existing sign, then the existing sign is
|
||||
|
||||
Reference in New Issue
Block a user