To: vim_dev@googlegroups.com Subject: Patch 9.0.1141 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1141 Problem: 'cursorcolumn' and 'colorcolumn' wrong after concealing and wrapping line. Solution: Reset "wlv.vcol_off" after each screen line. (Alexey Radkov, closes #11777) Files: src/drawline.c, src/testdir/test_conceal.vim, src/testdir/dumps/Test_conceal_cuc_01.dump, src/testdir/dumps/Test_conceal_cuc_02.dump *** ../vim-9.0.1140/src/drawline.c 2023-01-01 14:04:47.863216040 +0000 --- src/drawline.c 2023-01-04 10:57:03.733844097 +0000 *************** *** 3893,3898 **** --- 3893,3899 ---- wlv_screen_line(wp, &wlv, FALSE); wlv.col += wlv.boguscols; wlv.boguscols = 0; + wlv.vcol_off = 0; #else wlv_screen_line(wp, &wlv, FALSE); #endif *** ../vim-9.0.1140/src/testdir/test_conceal.vim 2022-10-04 22:40:34.032508860 +0100 --- src/testdir/test_conceal.vim 2023-01-04 10:57:03.733844097 +0000 *************** *** 139,144 **** --- 139,176 ---- call StopVimInTerminal(buf) endfunc + func Test_conceal_with_cursorcolumn() + CheckScreendump + + " Check that cursorcolumn and colorcolumn don't get broken in presence of + " wrapped lines containing concealed text + let code =<< trim [CODE] + let lines = ["one one one |hidden| one one one one one one one one", + \ "two two two two |hidden| here two two", + \ "three |hidden| three three three three three three three three"] + call setline(1, lines) + set wrap linebreak + set showbreak=\ >>>\ + syntax match test /|hidden|/ conceal + set conceallevel=2 + set concealcursor= + exe "normal /here\r" + set cursorcolumn + set colorcolumn=50 + [CODE] + + call writefile(code, 'XTest_conceal_cuc', 'D') + let buf = RunVimInTerminal('-S XTest_conceal_cuc', {'rows': 10, 'cols': 40}) + call VerifyScreenDump(buf, 'Test_conceal_cuc_01', {}) + + " move cursor to the end of line (the cursor jumps to the next screen line) + call term_sendkeys(buf, "$") + call VerifyScreenDump(buf, 'Test_conceal_cuc_02', {}) + + " clean up + call StopVimInTerminal(buf) + endfunc + func Test_conceal_resize_term() CheckScreendump *** ../vim-9.0.1140/src/testdir/dumps/Test_conceal_cuc_01.dump 2023-01-04 11:03:47.893614530 +0000 --- src/testdir/dumps/Test_conceal_cuc_01.dump 2023-01-04 10:57:03.733844097 +0000 *************** *** 0 **** --- 1,10 ---- + |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| @1|o|n|e| |o|n|e| |o|n|e| |o+0&#e0e0e08|n+0&#ffffff0|e| @11 + | +0#4040ff13&|>@2| |o+0#0000000&|n|e| |o+0&#ffd7d7255|n+0&#ffffff0|e| |o|n|e| |o|n|e| @19 + |t|w|o| |t|w|o| |t|w|o| |t|w|o| |||h|i|d@1|e|n||| >h|e|r|e| |t|w|o| |t|w|o| @2 + |t|h|r|e@1| @1|t|h|r|e@1| |t|h|r|e@1| |t|h|r|e@1| |t+0&#e0e0e08|h+0&#ffffff0|r|e@1| @9 + | +0#4040ff13&|>@2| |t+0#0000000&|h|r|e|e+0&#ffd7d7255| +0&#ffffff0|t|h|r|e@1| |t|h|r|e@1| |t|h|r|e@1| @11 + |~+0#4040ff13&| @38 + |~| @38 + |~| @38 + |~| @38 + |/+0#0000000&|h|e|r|e| @16|2|,|2|6| @9|A|l@1| *** ../vim-9.0.1140/src/testdir/dumps/Test_conceal_cuc_02.dump 2023-01-04 11:03:47.897614525 +0000 --- src/testdir/dumps/Test_conceal_cuc_02.dump 2023-01-04 10:57:03.733844097 +0000 *************** *** 0 **** --- 1,10 ---- + |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| @1|o|n|e| |o|n|e| |o|n|e| |o|n|e| @11 + | +0#4040ff13&|>@2| |o+0#0000000&|n|e| |o+0&#ffd7d7255|n+0&#ffffff0|e| |o|n|e| |o|n|e| @19 + |t|w|o| |t|w|o| |t|w|o| |t|w|o| |||h|i|d@1|e|n||| |h|e|r|e| |t|w|o| |t|w>o| @2 + |t|h|r|e@1| @1|t|h|r|e@1| |t|h|r|e@1| |t|h|r|e@1| |t|h|r|e@1| @9 + | +0#4040ff13&|>@2| |t+0#0000000&|h|r|e|e+0&#ffd7d7255| +0&#ffffff0|t|h|r|e@1| |t|h|r|e@1| |t|h|r|e@1| @11 + |~+0#4040ff13&| @38 + |~| @38 + |~| @38 + |~| @38 + |/+0#0000000&|h|e|r|e| @16|2|,|3|7| @9|A|l@1| *** ../vim-9.0.1140/src/version.c 2023-01-03 19:08:46.009020599 +0000 --- src/version.c 2023-01-04 11:05:56.849513752 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1141, /**/ -- We apologise again for the fault in the subtitles. Those responsible for sacking the people who have just been sacked have been sacked. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///