Files
neovim/src/nvim/sign_defs.h
zeertzjq 6a886a2511 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>
2024-07-07 07:21:14 +08:00

31 lines
938 B
C

#pragma once
#include "nvim/decoration_defs.h"
#include "nvim/types_defs.h"
/// Sign attributes. Used by the screen refresh routines.
typedef struct {
schar_T text[SIGN_WIDTH];
int hl_id;
} SignTextAttrs;
/// Struct to hold the sign properties.
typedef struct {
char *sn_name; // name of sign
char *sn_icon; // name of pixmap
schar_T sn_text[SIGN_WIDTH]; // text used instead of pixmap
int sn_line_hl; // highlight ID for line
int sn_text_hl; // highlight ID for text
int sn_cul_hl; // highlight ID for text on current line when 'cursorline' is set
int sn_num_hl; // highlight ID for line number
int sn_priority; // default priority of this sign, -1 means SIGN_DEF_PRIO
} sign_T;
typedef struct {
DecorSignHighlight *sh;
uint32_t id;
} SignItem;
enum { SIGN_SHOW_MAX = 9, }; ///< Maximum number of signs shown on a single line
enum { SIGN_DEF_PRIO = 10, }; ///< Default sign highlight priority