patch 9.1.0512: Mode message for spell completion doesn't match allowed keys
Problem: Mode message for spell completion doesn't match allowed keys
(Kyle Kovacs)
Solution: Show "^S" instead of "s".
(zeertzjq)
This matches the code in vim_is_ctrl_x_key():
case CTRL_X_SPELL:
return (c == Ctrl_S || c == Ctrl_P || c == Ctrl_N);
fixes: neovim/neovim#29431
closes: #15065
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
index 1ddcd83..692e191 100644
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -5,6 +5,7 @@
CheckFeature spell
source screendump.vim
+source view_util.vim
func TearDown()
set nospell
@@ -300,6 +301,20 @@
set spell& spelllang& dictionary& ignorecase&
endfunc
+func Test_compl_with_CTRL_X_s()
+ new
+ set spell spelllang=en_us showmode
+ inoremap <buffer><F2> <Cmd>let g:msg = Screenline(&lines)<CR>
+
+ call feedkeys("STheatre\<C-X>s\<F2>\<C-Y>\<Esc>", 'tx')
+ call assert_equal(['Theater'], getline(1, '$'))
+ call assert_match('(^S^N^P)', g:msg)
+
+ bwipe!
+ set spell& spelllang& showmode&
+ unlet g:msg
+endfunc
+
func Test_spellrepall()
new
set spell