From d71e6bd763f0e32f38aaec9cc66f5a3c4e533886 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 30 Mar 2020 14:39:20 +0200 Subject: don't delete word if correction is empty --- spellcheck.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spellcheck.lua b/spellcheck.lua index d569efc..54cffc4 100644 --- a/spellcheck.lua +++ b/spellcheck.lua @@ -115,7 +115,7 @@ vis:map(vis.modes.NORMAL, "w", function(keys) f:close() -- trim correction correction = correction:match("^%s*(.-)%s*$") - if correction then + if correction ~= "" then win.file:delete(range) win.file:insert(range.start, correction) end -- cgit v1.2.3