diff options
| -rw-r--r-- | spellcheck.lua | 2 |
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) |
