aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-02 06:48:11 +0800
committerGitHub <noreply@github.com>2024-03-02 06:48:11 +0800
commit62d04f21d9eb16f8fca2ed5038c7af4fa3f8c63a (patch)
tree684afb3d3688f0c4c58f2456a2130f949cdc78c7 /test
parent1fe65b3457d2e0632831445899d6d8a4bff9daee (diff)
downloadrneovim-62d04f21d9eb16f8fca2ed5038c7af4fa3f8c63a.tar.gz
rneovim-62d04f21d9eb16f8fca2ed5038c7af4fa3f8c63a.tar.bz2
rneovim-62d04f21d9eb16f8fca2ed5038c7af4fa3f8c63a.zip
vim-patch:9.1.0146: v:echospace wrong with invalid value of 'showcmdloc' (#27697)
Problem: v:echospace wrong after setting invalid value to 'showcmdloc'. Solution: Only call comp_col() if value is valid. (zeertzjq) closes: vim/vim#14119 https://github.com/vim/vim/commit/c27fcf4857228bc650943246ffbba444a085b3e7
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_messages.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/old/testdir/test_messages.vim b/test/old/testdir/test_messages.vim
index 5979e35327..ac5184645f 100644
--- a/test/old/testdir/test_messages.vim
+++ b/test/old/testdir/test_messages.vim
@@ -171,6 +171,12 @@ func Test_echospace()
call assert_equal(&columns - 19, v:echospace)
set showcmdloc=tabline
call assert_equal(&columns - 19, v:echospace)
+ call assert_fails('set showcmdloc=leap', 'E474:')
+ call assert_equal(&columns - 19, v:echospace)
+ set showcmdloc=last
+ call assert_equal(&columns - 29, v:echospace)
+ call assert_fails('set showcmdloc=jump', 'E474:')
+ call assert_equal(&columns - 29, v:echospace)
set ruler& showcmd& showcmdloc&
endfunc