diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-03-30 14:39:20 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-03-30 14:39:20 +0200 |
| commit | d71e6bd763f0e32f38aaec9cc66f5a3c4e533886 (patch) | |
| tree | 149a3af63cbf720215c129dd7c85b3dc86473d99 /spellcheck.lua | |
| parent | c51c07a7aabdb350c89b51bafabbd5c9885065ae (diff) | |
| download | vis-spellcheck-d71e6bd763f0e32f38aaec9cc66f5a3c4e533886.tar.gz vis-spellcheck-d71e6bd763f0e32f38aaec9cc66f5a3c4e533886.zip | |
don't delete word if correction is empty
Diffstat (limited to 'spellcheck.lua')
| -rw-r--r-- | spellcheck.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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, "<C-w>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 |
