From 377ff0f4cb7015db52303d64fb4536fb94a67900 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 25 Mar 2021 11:11:57 +0100 Subject: fix off-by-one highlighting in non-syntax aware mode --- spellcheck.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spellcheck.lua b/spellcheck.lua index a96ba6a..0926032 100644 --- a/spellcheck.lua +++ b/spellcheck.lua @@ -171,7 +171,7 @@ vis.events.subscribe(vis.events.WIN_HIGHLIGHT, function(win) end for _, start, finish in typo_iter(viewport_text, typos, ignored) do - win:style(spellcheck.typo_style_id, viewport.start + start - 1, viewport.start + finish) + win:style(spellcheck.typo_style_id, viewport.start + start - 1, viewport.start + finish - 1) end last_viewport = viewport_text -- cgit v1.2.3