diff options
Diffstat (limited to 'spellcheck.lua')
| -rw-r--r-- | spellcheck.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spellcheck.lua b/spellcheck.lua index 4a2a9df..c2f4971 100644 --- a/spellcheck.lua +++ b/spellcheck.lua @@ -39,11 +39,19 @@ else return nil end -spellcheck.typo_style_id = 42 +spellcheck.typo_style_id = vis.API > 3215 and vis.ui:style_push() or 42 spellcheck.typo_style = 'fore:red' spellcheck.check_full_viewport = {} spellcheck.disable_syntax_awareness = false +local function style_define(id, style) + if vis.API and vis.API > 3215 then + return vis.ui:style_define(id, style) + else + return vis.win:style_define(id, style) + end +end + -- Only use tokens for spellchecking if they are available. -- If vis is used in setups without lua-lpeg the lexer tokens are not available. if vis.lexers then |
