diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-05-10 08:17:58 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-05-10 08:17:58 +0200 |
| commit | b435a8beb09ccde9c469f7e47d6c12e5113030c6 (patch) | |
| tree | 55eb4d45e945b1d743b1b6dcc258b23b3c66f516 /spellcheck.lua | |
| parent | 61465acff5beed5467d869d6f0e8947fda5f7041 (diff) | |
| download | vis-spellcheck-b435a8beb09ccde9c469f7e47d6c12e5113030c6.tar.gz vis-spellcheck-b435a8beb09ccde9c469f7e47d6c12e5113030c6.zip | |
cleanup wrong return values in key mapping
Diffstat (limited to 'spellcheck.lua')
| -rw-r--r-- | spellcheck.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spellcheck.lua b/spellcheck.lua index 60623d0..d8094cf 100644 --- a/spellcheck.lua +++ b/spellcheck.lua @@ -347,27 +347,27 @@ vis:map(vis.modes.NORMAL, '<C-w>w', function() local ret, so, se = vis:pipe(win.file, range, cmd) if ret ~= 0 then vis:message('calling ' .. cmd .. ' failed (' .. se .. ')') - return false + return end local answer_line = so:match('.-\n(.-)\n.*') if not answer_line then - return false + return end local suggestions local first_char = answer_line:sub(0, 1) if first_char == '*' then vis:info(file:content(range) .. ' is correctly spelled') - return true + return elseif first_char == '#' then vis:info('No corrections available for ' .. file:content(range)) - return false + return elseif first_char == '&' then suggestions = answer_line:match('& %S+ %d+ %d+: (.*)') else vis:info('Unknown answer: ' .. answer_line) - return false + return end -- select a correction |
