aboutsummaryrefslogtreecommitdiff
path: root/spellcheck.lua
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-08-25 15:23:15 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-08-25 15:33:07 +0200
commit766c09d335568c0c82aa2391ff1fea85e45af95f (patch)
tree34ff929b7721f5c79471dd3fa144a2a1764bad27 /spellcheck.lua
parent9fdc3215ffb07a89c053062bf1dc29f5c046db2d (diff)
downloadvis-spellcheck-766c09d335568c0c82aa2391ff1fea85e45af95f.tar.gz
vis-spellcheck-766c09d335568c0c82aa2391ff1fea85e45af95f.zip
fix start index for string.find
Lua indexing starts at 1 not 0.
Diffstat (limited to 'spellcheck.lua')
-rw-r--r--spellcheck.lua2
1 files changed, 1 insertions, 1 deletions
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)