aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-01-28 11:14:15 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-01-28 11:14:15 +0100
commit1727981f75051b659a50f29f7ad3a9ab97e6bc87 (patch)
treecd18d5b32716b9dc3aa0090efb39eb9ca939a1e3
parentdcfdb309b89b88608346365e19b74900e002b6b9 (diff)
downloadvis-spellcheck-1727981f75051b659a50f29f7ad3a9ab97e6bc87.tar.gz
use 42 instead of win.STYLE_INFO as style id
Now the used style should not overlapp with a different feature
-rw-r--r--spellcheck.lua4
1 files 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