vim-patch:9.1.0538: not possible to assign priority when defining a sign (#29592)

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: vim/vim#8334
closes: vim/vim#15124

b975ddfdf9

Co-authored-by: LemonBoy <thatlemon@gmail.com>
This commit is contained in:
zeertzjq
2024-07-07 07:21:14 +08:00
committed by GitHub
parent 472b5b9b20
commit 6a886a2511
8 changed files with 96 additions and 26 deletions

View File

@@ -10112,6 +10112,7 @@ M.funcs = {
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
@@ -10322,7 +10323,8 @@ M.funcs = {
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