Mercurial > vim
diff src/testdir/test_listchars.vim @ 16592:80bb4ce2a281 v8.1.1299
patch 8.1.1299: "extends" from 'listchars' is used when 'list' is off
commit https://github.com/vim/vim/commit/a5c6a0b6c71ae11078cbf6f5e18ce49a0468a117
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 8 20:20:46 2019 +0200
patch 8.1.1299: "extends" from 'listchars' is used when 'list' is off
Problem: "extends" from 'listchars' is used when 'list' is off. (Hiroyuki
Yoshinaga)
Solution: Only use the "extends" character when 'list' is on. (Hirohito
Higashi, closes #4360)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 08 May 2019 20:30:04 +0200 |
parents | 5fb0f15fafea |
children | a51ccadd0dca |
line wrap: on
line diff
--- a/src/testdir/test_listchars.vim +++ b/src/testdir/test_listchars.vim @@ -110,6 +110,25 @@ func Test_listchars() call cursor(1, 1) call assert_equal([expected], ScreenLines(1, virtcol('$'))) + " test extends + normal ggdG + set listchars=extends:Z + set nowrap + set nolist + call append(0, [ repeat('A', &columns + 1) ]) + + let expected = repeat('A', &columns) + + redraw! + call cursor(1, 1) + call assert_equal([expected], ScreenLines(1, &columns)) + + set list + let expected = expected[:-2] . 'Z' + redraw! + call cursor(1, 1) + call assert_equal([expected], ScreenLines(1, &columns)) + enew! set listchars& ff& endfunc