diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-23 20:58:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-23 20:58:45 +0200 |
commit | 37f4cbd46f5a6f2dd3a48d5fa4324dce37e4bd6c (patch) | |
tree | bed00affbe1920deeeb36b270db9c3b076694c0f /src/testdir | |
parent | 570497ac409ad448574bb6210cb9c6e573483759 (diff) |
patch 8.1.1913: not easy to compute the space on the command linev8.1.1913
Problem: Not easy to compute the space on the command line.
Solution: Add v:echospace. (Daniel Hahler, closes #4732)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_messages.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim index 8c6c854fab..f122917ba7 100644 --- a/src/testdir/test_messages.vim +++ b/src/testdir/test_messages.vim @@ -155,3 +155,20 @@ func Test_mode_message_at_leaving_insert_with_esc_mapped() exe buf . 'bwipe!' call delete(testfile) 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 |