vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 3e84c4b711bba949ab060cb0afd26b9b36e3a313 parent 5b3c9475d8535af0c2d16a65eae8159a0835ad74 Author: Rudy Dellomas III <dther@dther.xyz> Date: Fri, 19 Apr 2024 09:57:25 +1000 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. Diffstat:
| M | vis-lua.c | | | 1 | + |
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git 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" },