To: vim_dev@googlegroups.com Subject: Patch 9.0.0722 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0722 Problem: Virtual text "after" does not show with 'list' set. Solution: Do not break out of the loop when another text prop follows. (closes #11337) Files: src/drawline.c, src/testdir/test_textprop.vim, src/testdir/dumps/Test_props_after_1.dump, src/testdir/dumps/Test_props_after_2.dump *** ../vim-9.0.0721/src/drawline.c 2022-10-11 14:54:23.252006995 +0100 --- src/drawline.c 2022-10-11 15:29:04.371425556 +0100 *************** *** 3787,3800 **** // When not wrapping and finished diff lines, or when displayed // '$' and highlighting until last column, break here. ! if ((!wp->w_p_wrap #ifdef FEAT_DIFF && wlv.filler_todo <= 0 #endif #ifdef FEAT_PROP_POPUP ! && !text_prop_above && !text_prop_follows #endif ! ) || lcs_eol_one == -1) break; #ifdef FEAT_PROP_POPUP if (!wp->w_p_wrap && text_prop_follows && !text_prop_above) --- 3787,3804 ---- // When not wrapping and finished diff lines, or when displayed // '$' and highlighting until last column, break here. ! if (((!wp->w_p_wrap #ifdef FEAT_DIFF && wlv.filler_todo <= 0 #endif #ifdef FEAT_PROP_POPUP ! && !text_prop_above #endif ! ) || lcs_eol_one == -1) ! #ifdef FEAT_PROP_POPUP ! && !text_prop_follows ! #endif ! ) break; #ifdef FEAT_PROP_POPUP if (!wp->w_p_wrap && text_prop_follows && !text_prop_above) *** ../vim-9.0.0721/src/testdir/test_textprop.vim 2022-10-11 14:54:23.252006995 +0100 --- src/testdir/test_textprop.vim 2022-10-11 15:26:26.783452619 +0100 *************** *** 2628,2633 **** --- 2628,2670 ---- call assert_fails('call prop_add(1, 2, #{text: "yes", text_align: "right", type: "some"})', 'E1294:') endfunc + func Test_props_with_text_after_and_list() + CheckRunVimInTerminal + + let lines =<< trim END + vim9script + setline(1, ['one', 'two']) + prop_type_add('test', {highlight: 'Special'}) + prop_add(1, 0, { + type: 'test', + text: range(50)->join(' '), + text_align: 'after', + text_padding_left: 3 + }) + prop_add(1, 0, { + type: 'test', + text: range(50)->join('-'), + text_align: 'after', + text_padding_left: 5 + }) + prop_add(1, 0, { + type: 'test', + text: range(50)->join('.'), + text_align: 'after', + text_padding_left: 1 + }) + normal G$ + END + call writefile(lines, 'XscriptPropsAfter', 'D') + let buf = RunVimInTerminal('-S XscriptPropsAfter', #{rows: 8, cols: 60}) + call VerifyScreenDump(buf, 'Test_props_after_1', {}) + + call term_sendkeys(buf, ":set list\") + call VerifyScreenDump(buf, 'Test_props_after_2', {}) + + call StopVimInTerminal(buf) + endfunc + func Test_props_with_text_after_below_trunc() CheckRunVimInTerminal *** ../vim-9.0.0721/src/testdir/dumps/Test_props_after_1.dump 2022-10-11 15:29:20.595422801 +0100 --- src/testdir/dumps/Test_props_after_1.dump 2022-10-11 15:26:33.651451426 +0100 *************** *** 0 **** --- 1,8 ---- + |o+0&#ffffff0|n|e| @2|0+0#e000e06&| |1| |2| |3| |4| |5| |6| |7| |8| |9| |1|0| |1@1| |1|2| |1|3| |1|4| |1|5| |1|6| |1|7| |1|8| |1|9| |2|0| |… + | +0#0000000&@4|0+0#e000e06&|-|1|-|2|-|3|-|4|-|5|-|6|-|7|-|8|-|9|-|1|0|-|1@1|-|1|2|-|1|3|-|1|4|-|1|5|-|1|6|-|1|7|-|1|8|-|1|9|-|2|0|-|2|… + | +0#0000000&|0+0#e000e06&|.|1|.|2|.|3|.|4|.|5|.|6|.|7|.|8|.|9|.|1|0|.|1@1|.|1|2|.|1|3|.|1|4|.|1|5|.|1|6|.|1|7|.|1|8|.|1|9|.|2|0|.|2|1|.|2@1|… + |t+0#0000000&|w>o| @56 + |~+0#4040ff13&| @58 + |~| @58 + |~| @58 + | +0#0000000&@41|2|,|3| @10|A|l@1| *** ../vim-9.0.0721/src/testdir/dumps/Test_props_after_2.dump 2022-10-11 15:29:20.599422800 +0100 --- src/testdir/dumps/Test_props_after_2.dump 2022-10-11 15:26:34.803451230 +0100 *************** *** 0 **** --- 1,8 ---- + |o+0&#ffffff0|n|e|$+0#4040ff13&| +0#0000000&@2|0+0#e000e06&| |1| |2| |3| |4| |5| |6| |7| |8| |9| |1|0| |1@1| |1|2| |1|3| |1|4| |1|5| |1|6| |1|7| |1|8| |1|9| |2|0|… + | +0#0000000&@4|0+0#e000e06&|-|1|-|2|-|3|-|4|-|5|-|6|-|7|-|8|-|9|-|1|0|-|1@1|-|1|2|-|1|3|-|1|4|-|1|5|-|1|6|-|1|7|-|1|8|-|1|9|-|2|0|-|2|… + | +0#0000000&|0+0#e000e06&|.|1|.|2|.|3|.|4|.|5|.|6|.|7|.|8|.|9|.|1|0|.|1@1|.|1|2|.|1|3|.|1|4|.|1|5|.|1|6|.|1|7|.|1|8|.|1|9|.|2|0|.|2|1|.|2@1|… + |t+0#0000000&|w>o|$+0#4040ff13&| +0#0000000&@55 + |~+0#4040ff13&| @58 + |~| @58 + |~| @58 + |:+0#0000000&|s|e|t| |l|i|s|t| @32|2|,|3| @10|A|l@1| *** ../vim-9.0.0721/src/version.c 2022-10-11 14:54:23.252006995 +0100 --- src/version.c 2022-10-11 15:16:48.555560088 +0100 *************** *** 701,702 **** --- 701,704 ---- { /* Add new patch number below this line */ + /**/ + 722, /**/ -- A poem: read aloud: <> !*''# Waka waka bang splat tick tick hash, ^"`$$- Caret quote back-tick dollar dollar dash, !*=@$_ Bang splat equal at dollar under-score, %*<> ~#4 Percent splat waka waka tilde number four, &[]../ Ampersand bracket bracket dot dot slash, |{,,SYSTEM HALTED Vertical-bar curly-bracket comma comma CRASH. Fred Bremmer and Steve Kroese (Calvin College & Seminary of Grand Rapids, MI.) /// 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 ///