vim-patch:8.1.1631: displaying signs is inefficient

+ support for neovim's dynamic width signcolumn

Problem:    Displaying signs is inefficient.
Solution:   Avoid making multiple calls to get information about a placed
            sign. (Yegappan Lakshmanan, closes #4586)
This commit is contained in:
Lewis Russell
2021-03-21 00:00:50 +00:00
parent 804ea22944
commit 0b7e5eeb62
4 changed files with 121 additions and 100 deletions

View File

@@ -33,16 +33,25 @@ struct signlist
signlist_T *prev; // previous entry -- for easy reordering
};
/// Sign attributes. Used by the screen refresh routines.
typedef struct sign_attrs_S {
int typenr;
char_u *text;
int texthl;
int linehl;
int numhl;
} sign_attrs_T;
#define SIGN_SHOW_MAX 9
// Default sign priority for highlighting
#define SIGN_DEF_PRIO 10
// type argument for buf_getsigntype() and sign_get_attr()
// type argument for sign_get_attr()
typedef enum {
SIGN_ANY,
SIGN_LINEHL,
SIGN_ICON,
SIGN_TEXT,
SIGN_NUMHL,
SIGN_TEXT,
} SignType;