diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-01-17 15:32:02 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-01-17 15:32:02 +0100 |
| commit | c51c07a7aabdb350c89b51bafabbd5c9885065ae (patch) | |
| tree | 2688045e685f316621481f8b7986fda80030c575 | |
| parent | b90a49c42dbe49121acfdff58d754073a1a9f75f (diff) | |
| download | vis-spellcheck-c51c07a7aabdb350c89b51bafabbd5c9885065ae.tar.gz vis-spellcheck-c51c07a7aabdb350c89b51bafabbd5c9885065ae.zip | |
fix corrections containing whitespace
| -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) |
