To: vim_dev@googlegroups.com Subject: Patch 9.0.1124 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1124 Problem: Virtual text at a column position is truncated at the window edge. (Yegappan Lakshmanan) Solution: Do not truncated virtual text that is placed at a column. Files: src/drawline.c, src/testdir/test_textprop.vim, src/testdir/dumps/Test_prop_with_wrap_1.dump *** ../vim-9.0.1123/src/drawline.c 2022-12-26 12:49:58.652390143 +0000 --- src/drawline.c 2023-01-01 13:52:37.809411304 +0000 *************** *** 643,649 **** int right = (tp->tp_flags & TP_FLAG_ALIGN_RIGHT); int above = (tp->tp_flags & TP_FLAG_ALIGN_ABOVE); int below = (tp->tp_flags & TP_FLAG_ALIGN_BELOW); ! int wrap = (tp->tp_flags & TP_FLAG_WRAP); int padding = tp->tp_col == MAXCOL && tp->tp_len > 1 ? tp->tp_len - 1 : 0; int col_with_padding = scr_col + (below ? 0 : padding); --- 643,649 ---- int right = (tp->tp_flags & TP_FLAG_ALIGN_RIGHT); int above = (tp->tp_flags & TP_FLAG_ALIGN_ABOVE); int below = (tp->tp_flags & TP_FLAG_ALIGN_BELOW); ! int wrap = tp->tp_col < MAXCOL || (tp->tp_flags & TP_FLAG_WRAP); int padding = tp->tp_col == MAXCOL && tp->tp_len > 1 ? tp->tp_len - 1 : 0; int col_with_padding = scr_col + (below ? 0 : padding); *** ../vim-9.0.1123/src/testdir/test_textprop.vim 2022-12-19 13:30:34.315772238 +0000 --- src/testdir/test_textprop.vim 2023-01-01 13:58:12.144192954 +0000 *************** *** 1978,1983 **** --- 1978,1984 ---- setline(1, 'asdf '->repeat(15)) prop_type_add('test', {highlight: 'Special'}) prop_add(1, 43, {text: 'some virtual text', type: 'test'}) + normal G$ END call writefile(lines, 'XscriptPropWithWrap', 'D') let buf = RunVimInTerminal('-S XscriptPropWithWrap', #{rows: 6, cols: 50}) *** ../vim-9.0.1123/src/testdir/dumps/Test_prop_with_wrap_1.dump 2022-08-10 13:39:16.978344665 +0100 --- src/testdir/dumps/Test_prop_with_wrap_1.dump 2023-01-01 13:58:45.140096757 +0000 *************** *** 1,6 **** ! >a+0&#ffffff0|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|s+0#e000e06&|o|m|e| |v|i|… ! |d+0#0000000&|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| @17 |~+0#4040ff13&| @48 |~| @48 |~| @48 ! | +0#0000000&@31|1|,|1| @10|A|l@1| --- 1,6 ---- ! |a+0&#ffffff0|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|s+0#e000e06&|o|m|e| |v|i|r ! |t|u|a|l| |t|e|x|t|d+0#0000000&|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f> @8 |~+0#4040ff13&| @48 |~| @48 |~| @48 ! | +0#0000000&@31|1|,|7|5|-|9|2| @6|A|l@1| *** ../vim-9.0.1123/src/version.c 2023-01-01 12:58:29.474417546 +0000 --- src/version.c 2023-01-01 13:53:45.409121668 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1124, /**/ -- SIGIRO -- irony detected (iron core dumped) /// 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 ///