Mercurial > vim
comparison src/testdir/test_listchars.vim @ 15715:52930462eec4 v8.1.0865
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
commit https://github.com/vim/vim/commit/895d966e341c187ffcf9da88dba193cbfcebf000
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 31 21:57:21 2019 +0100
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Problem: When 'listchars' only contains "nbsp:X" it does not work.
Solution: Set extra_check when lcs_nbsp is set. (Ralf Schandl, closes https://github.com/vim/vim/issues/3889)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 31 Jan 2019 22:00:06 +0100 |
parents | bc17a9d37810 |
children | aaa6e9a43a60 |
comparison
equal
deleted
inserted
replaced
15714:4763c41426b5 | 15715:52930462eec4 |
---|---|
88 \ '..fff>--<<$', | 88 \ '..fff>--<<$', |
89 \ '>-------gg>-----$', | 89 \ '>-------gg>-----$', |
90 \ '.....h>-$', | 90 \ '.....h>-$', |
91 \ 'iii<<<<><<$', '$'], l) | 91 \ 'iii<<<<><<$', '$'], l) |
92 | 92 |
93 | |
94 " test nbsp | |
95 normal ggdG | |
96 set listchars=nbsp:X,trail:Y | |
97 set list | |
98 " Non-breaking space | |
99 let nbsp = nr2char(0xa0) | |
100 call append(0, [ ">".nbsp."<" ]) | |
101 | |
102 let expected = '>X< ' | |
103 | |
104 redraw! | |
105 call cursor(1, 1) | |
106 call assert_equal([expected], ScreenLines(1, virtcol('$'))) | |
107 | |
108 set listchars=nbsp:X | |
109 redraw! | |
110 call cursor(1, 1) | |
111 call assert_equal([expected], ScreenLines(1, virtcol('$'))) | |
112 | |
93 enew! | 113 enew! |
94 set listchars& ff& | 114 set listchars& ff& |
95 endfunc | 115 endfunc |