From f01cf2c3cd30536344534fa24c8a3b3e63f7f982 Mon Sep 17 00:00:00 2001 From: Rudy Dellomas III Date: Fri, 19 Apr 2024 09:57:25 +1000 Subject: Add a Lua constant for UI_STYLE_LEXER_MAX Currently, there's no mechanism for defining user styles without risk of collision with default lexer and theme settings. Very few lexers use more than 10, let alone all 64 of the allowed styles, so UI_STYLE_LEXER_MAX - (no. of user defined styles) allows for a reasonably large number of user-defined styles before collision becomes a problem. --- vis-lua.c | 1 + 1 file changed, 1 insertion(+) (limited to 'vis-lua.c') diff --git a/vis-lua.c b/vis-lua.c index 98a5249..b103b12 100644 --- a/vis-lua.c +++ b/vis-lua.c @@ -3276,6 +3276,7 @@ void vis_lua_init(Vis *vis) { enum UiStyle id; const char *name; } styles[] = { + { UI_STYLE_LEXER_MAX, "STYLE_LEXER_MAX" }, { UI_STYLE_DEFAULT, "STYLE_DEFAULT" }, { UI_STYLE_CURSOR, "STYLE_CURSOR" }, { UI_STYLE_CURSOR_PRIMARY, "STYLE_CURSOR_PRIMARY" }, -- cgit v1.2.3