aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-08-25 20:53:17 +0200
committerGitHub <noreply@github.com>2019-08-25 20:53:17 +0200
commitbec2336231f434948fcd17b35b67584234785996 (patch)
treec652210623667462a63f8c0432e01ac003a1a72d /src/nvim/testdir
parentc8fc285db60decb020c180622613d3880cbefbfe (diff)
downloadrneovim-bec2336231f434948fcd17b35b67584234785996.tar.gz
rneovim-bec2336231f434948fcd17b35b67584234785996.tar.bz2
rneovim-bec2336231f434948fcd17b35b67584234785996.zip
vim-patch:8.1.1913: not easy to compute the space on the command line (#10845)
Problem: Not easy to compute the space on the command line. Solution: Add v:echospace. (Daniel Hahler, closes vim/vim#4732) https://github.com/vim/vim/commit/37f4cbd46f5a6f2dd3a48d5fa4324dce37e4bd6c
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_messages.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_messages.vim b/src/nvim/testdir/test_messages.vim
index 8b71d5f03e..265dee66ce 100644
--- a/src/nvim/testdir/test_messages.vim
+++ b/src/nvim/testdir/test_messages.vim
@@ -64,3 +64,20 @@ func Test_message_completion()
call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx')
call assert_equal('"message clear', @:)
endfunc
+
+func Test_echospace()
+ set noruler noshowcmd laststatus=1
+ call assert_equal(&columns - 1, v:echospace)
+ split
+ call assert_equal(&columns - 1, v:echospace)
+ set ruler
+ call assert_equal(&columns - 1, v:echospace)
+ close
+ call assert_equal(&columns - 19, v:echospace)
+ set showcmd noruler
+ call assert_equal(&columns - 12, v:echospace)
+ set showcmd ruler
+ call assert_equal(&columns - 29, v:echospace)
+
+ set ruler& showcmd&
+endfunc