0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.1631: displaying signs is inefficient

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:
Bram Moolenaar
2019-07-04 18:28:35 +02:00
parent e809a4ed30
commit 4e038571aa
5 changed files with 101 additions and 84 deletions

View File

@@ -759,6 +759,17 @@ 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;
void *icon;
char_u *text;
int texthl;
int linehl;
} sign_attrs_T;
#if defined(FEAT_SIGNS) || defined(PROTO)
// Macros to get the sign group structure from the group name
#define SGN_KEY_OFF offsetof(signgroup_T, sg_name)
@@ -767,11 +778,6 @@ struct signlist
// Default sign priority for highlighting
#define SIGN_DEF_PRIO 10
/* type argument for buf_getsigntype() */
#define SIGN_ANY 0
#define SIGN_LINEHL 1
#define SIGN_ICON 2
#define SIGN_TEXT 3
#endif
/*