From 766c09d335568c0c82aa2391ff1fea85e45af95f Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 25 Aug 2020 15:23:15 +0200 Subject: fix start index for string.find Lua indexing starts at 1 not 0. --- spellcheck.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spellcheck.lua') diff --git a/spellcheck.lua b/spellcheck.lua index a6879b8..b14aec2 100644 --- a/spellcheck.lua +++ b/spellcheck.lua @@ -49,7 +49,7 @@ vis.events.subscribe(vis.events.WIN_HIGHLIGHT, function(win) end local corrections_iter = typos:gmatch("(.-)\n") - local index = 0 + local index = 1 for typo in corrections_iter do if not ignored[typo] then local start, finish = viewport_text:find(typo, index, true) -- cgit v1.2.3