From 1727981f75051b659a50f29f7ad3a9ab97e6bc87 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 28 Jan 2019 11:14:15 +0100 Subject: use 42 instead of win.STYLE_INFO as style id Now the used style should not overlapp with a different feature --- spellcheck.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spellcheck.lua b/spellcheck.lua index e18e012..b7a9c19 100644 --- a/spellcheck.lua +++ b/spellcheck.lua @@ -26,7 +26,7 @@ local ignored = {} local last_viewport, last_typos = nil, nil vis.events.subscribe(vis.events.WIN_HIGHLIGHT, function(win) - if not spellcheck.enabled[win] or not win:style_define(win.STYLE_INFO, "fore:red") then + if not spellcheck.enabled[win] or not win:style_define(42, "fore:red") then return false end local viewport = win.viewport @@ -53,7 +53,7 @@ vis.events.subscribe(vis.events.WIN_HIGHLIGHT, function(win) for typo in corrections_iter do if not ignored[typo] then local start, finish = viewport_text:find(typo, index, true) - win:style(win.STYLE_INFO, viewport.start + start - 1, viewport.start + finish) + win:style(42, viewport.start + start - 1, viewport.start + finish) index = finish end end -- cgit v1.2.3