aboutsummaryrefslogtreecommitdiff
path: root/spellcheck.lua
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-01-17 15:32:02 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-01-17 15:32:02 +0100
commitc51c07a7aabdb350c89b51bafabbd5c9885065ae (patch)
tree2688045e685f316621481f8b7986fda80030c575 /spellcheck.lua
parentb90a49c42dbe49121acfdff58d754073a1a9f75f (diff)
downloadvis-spellcheck-c51c07a7aabdb350c89b51bafabbd5c9885065ae.tar.gz
vis-spellcheck-c51c07a7aabdb350c89b51bafabbd5c9885065ae.zip
fix corrections containing whitespace
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 6c16afc..d569efc 100644
--- a/spellcheck.lua
+++ b/spellcheck.lua
@@ -114,7 +114,7 @@ vis:map(vis.modes.NORMAL, "<C-w>w", function(keys)
local correction = f:read("*all")
f:close()
-- trim correction
- correction = correction:match("%S+")
+ correction = correction:match("^%s*(.-)%s*$")
if correction then
win.file:delete(range)
win.file:insert(range.start, correction)