Mercurial > vim
comparison src/testdir/test_conceal.vim @ 30655:0fbf3e042602 v9.0.0662
patch 9.0.0662: concealed characters do not work correctly
Commit: https://github.com/vim/vim/commit/75008661821eee6989476908feaf64a9dea03e05
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Oct 4 22:40:56 2022 +0100
patch 9.0.0662: concealed characters do not work correctly
Problem: Concealed characters do not work correctly.
Solution: Subtract boguscols instead of adding them. (closes https://github.com/vim/vim/issues/11273)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 04 Oct 2022 23:45:02 +0200 |
parents | f7a2de8a4ddc |
children | 68fed60575ca |
comparison
equal
deleted
inserted
replaced
30654:84e4434535d6 | 30655:0fbf3e042602 |
---|---|
152 let buf = RunVimInTerminal('-S XTest_conceal_resize', {'rows': 6}) | 152 let buf = RunVimInTerminal('-S XTest_conceal_resize', {'rows': 6}) |
153 call VerifyScreenDump(buf, 'Test_conceal_resize_01', {}) | 153 call VerifyScreenDump(buf, 'Test_conceal_resize_01', {}) |
154 | 154 |
155 call win_execute(buf->win_findbuf()[0], 'wincmd +') | 155 call win_execute(buf->win_findbuf()[0], 'wincmd +') |
156 call VerifyScreenDump(buf, 'Test_conceal_resize_02', {}) | 156 call VerifyScreenDump(buf, 'Test_conceal_resize_02', {}) |
157 | |
158 " clean up | |
159 call StopVimInTerminal(buf) | |
160 endfunc | |
161 | |
162 func Test_conceal_linebreak() | |
163 CheckScreendump | |
164 | |
165 let code =<< trim [CODE] | |
166 vim9script | |
167 &wrap = true | |
168 &conceallevel = 2 | |
169 &concealcursor = 'nc' | |
170 &linebreak = true | |
171 &showbreak = '+ ' | |
172 var line: string = 'a`a`a`a`' | |
173 .. 'a'->repeat(&columns - 15) | |
174 .. ' b`b`' | |
175 .. 'b'->repeat(&columns - 10) | |
176 .. ' cccccc' | |
177 ['x'->repeat(&columns), '', line]->setline(1) | |
178 syntax region CodeSpan matchgroup=Delimiter start=/\z(`\+\)/ end=/\z1/ concealends | |
179 [CODE] | |
180 call writefile(code, 'XTest_conceal_linebreak', 'D') | |
181 let buf = RunVimInTerminal('-S XTest_conceal_linebreak', {'rows': 8}) | |
182 call VerifyScreenDump(buf, 'Test_conceal_linebreak_1', {}) | |
157 | 183 |
158 " clean up | 184 " clean up |
159 call StopVimInTerminal(buf) | 185 call StopVimInTerminal(buf) |
160 endfunc | 186 endfunc |
161 | 187 |