Patch 9.0.0662
Problem: Concealed characters do not work correctly.
Solution: Subtract boguscols instead of adding them. (closes #11273)
Files: src/drawline.c, src/testdir/test_conceal.vim,
src/testdir/dumps/Test_conceal_linebreak_1.dump
*** ../vim-9.0.0661/src/drawline.c 2022-10-04 16:23:39.010042185 +0100
--- src/drawline.c 2022-10-04 22:38:07.488859820 +0100
***************
*** 3689,3697 ****
)
{
#ifdef FEAT_CONCEAL
- wlv.col += wlv.boguscols;
- wlv_screen_line(wp, &wlv, FALSE);
wlv.col -= wlv.boguscols;
wlv.boguscols = 0;
#else
wlv_screen_line(wp, &wlv, FALSE);
--- 3689,3697 ----
)
{
#ifdef FEAT_CONCEAL
wlv.col -= wlv.boguscols;
+ wlv_screen_line(wp, &wlv, FALSE);
+ wlv.col += wlv.boguscols;
wlv.boguscols = 0;
#else
wlv_screen_line(wp, &wlv, FALSE);
*** ../vim-9.0.0661/src/testdir/test_conceal.vim 2022-09-08
16:39:16.912140162 +0100
--- src/testdir/test_conceal.vim 2022-10-04 22:37:48.584905468 +0100
***************
*** 159,164 ****
--- 159,190 ----
call StopVimInTerminal(buf)
endfunc
+ func Test_conceal_linebreak()
+ CheckScreendump
+
+ let code =<< trim [CODE]
+ vim9script
+ &wrap = true
+ &conceallevel = 2
+ &concealcursor = 'nc'
+ &linebreak = true
+ &showbreak = '+ '
+ var line: string = 'a`a`a`a`'
+ .. 'a'->repeat(&columns - 15)
+ .. ' b`b`'
+ .. 'b'->repeat(&columns - 10)
+ .. ' cccccc'
+ ['x'->repeat(&columns), '', line]->setline(1)
+ syntax region CodeSpan matchgroup=Delimiter start=/\z(`\+\)/ end=/\z1/
concealends
+ [CODE]
+ call writefile(code, 'XTest_conceal_linebreak', 'D')
+ let buf = RunVimInTerminal('-S XTest_conceal_linebreak', {'rows': 8})
+ call VerifyScreenDump(buf, 'Test_conceal_linebreak_1', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ endfunc
+
" Tests for correct display (cursor column position) with +conceal and
" tabulators. Need to run this test in a separate Vim instance. Otherwise the
" screen is not updated (lazy redraw) and the cursor position is wrong.
*** ../vim-9.0.0661/src/testdir/dumps/Test_conceal_linebreak_1.dump
2022-10-04 22:40:13.440557906 +0100
--- src/testdir/dumps/Test_conceal_linebreak_1.dump 2022-10-04
22:38:40.448780467 +0100
***************
*** 0 ****
--- 1,8 ----
+ >x+0&#ffffff0@74
+ | @74
+ |a@63| @10
+ |++0#4040ff13&| |b+0#0000000&@66| @5
+ |++0#4040ff13&| |c+0#0000000&@5| @66
+ |~+0#4040ff13&| @73
+ |~| @73
+ | +0#0000000&@56|1|,|1| @10|A|l@1|
*** ../vim-9.0.0661/src/version.c 2022-10-04 20:35:14.511103246 +0100
--- src/version.c 2022-10-04 22:32:16.773725631 +0100
***************
*** 701,702 ****
--- 701,704 ----
{ /* Add new patch number below this line */
+ /**/
+ 662,
/**/
--
ARTHUR: (as the MAN next to him is squashed by a sheep) Knights! Run away!
Midst echoing shouts of "run away" the KNIGHTS retreat to cover with the odd
cow or goose hitting them still. The KNIGHTS crouch down under cover.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20221004214141.755451C09A3%40moolenaar.net.