comparison src/testdir/test_listchars.vim @ 16146:aaa6e9a43a60 v8.1.1078

patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong commit https://github.com/vim/vim/commit/5f8069bbf5d989936a2f4d7a76ae42434017e3a2 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 30 15:34:47 2019 +0100 patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong Problem: When 'listchars' is set a composing char on a space is wrong. Solution: Separate handling a non-breaking space and a space. (Yasuhiro Matsumoto, closes #4046)
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 Mar 2019 15:45:05 +0100
parents 52930462eec4
children 90b0f2227d73
comparison
equal deleted inserted replaced
16145:3ac2f32abf22 16146:aaa6e9a43a60
111 call assert_equal([expected], ScreenLines(1, virtcol('$'))) 111 call assert_equal([expected], ScreenLines(1, virtcol('$')))
112 112
113 enew! 113 enew!
114 set listchars& ff& 114 set listchars& ff&
115 endfunc 115 endfunc
116
117 func Test_listchars_composing()
118 enew!
119 let oldencoding=&encoding
120 set encoding=utf-8
121 set ff=unix
122 set list
123
124 set listchars=eol:$,space:_
125 call append(0, [
126 \ " \u3099 \u309A"
127 \ ])
128 let expected = [
129 \ "_ \u3099^I \u309A$"
130 \ ]
131 redraw!
132 call cursor(1, 1)
133 let got = ScreenLinesUtf8(1, virtcol('$'))
134 bw!
135 call assert_equal(expected, got)
136 let &encoding=oldencoding
137 set listchars& ff&
138 endfunction