summaryrefslogtreecommitdiffstats
path: root/runtime/doc
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2024-07-06 18:04:09 +0200
committerChristian Brabandt <cb@256bit.org>2024-07-06 18:04:09 +0200
commitb975ddfdf96644b8df808415dee36f99abd48753 (patch)
tree01d6727b5db83738625d18007786b13c2522baaa /runtime/doc
parent25ac6d67d92e0adda53b8d44b81c15031643ca1e (diff)
patch 9.1.0538: not possible to assign priority when defining a signv9.1.0538
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>
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/sign.txt23
-rw-r--r--runtime/doc/version9.txt1
2 files changed, 15 insertions, 9 deletions
diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt
index dac3a57204..84b2977293 100644
--- a/runtime/doc/sign.txt
+++ b/runtime/doc/sign.txt
@@ -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
diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt
index d70c3b19e3..92792b9cd5 100644
--- a/runtime/doc/version9.txt
+++ b/runtime/doc/version9.txt
@@ -41576,6 +41576,7 @@ Changed~
- 'completeopt' is now a |global-local| option.
- 'nrformat' accepts the new "blank" suboption, to determine a signed or
unsigned number based on whitespace in front of a minus sign.
+- allow to specify a priority when defining a new sign |:sign-define|
*added-9.2*
Added ~