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)
diff --git a/src/structs.h b/src/structs.h
index 7fb8f22..4c4ce7d 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -759,6 +759,17 @@
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 @@
// 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
/*