To: vim_dev@googlegroups.com Subject: Patch 9.0.0718 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0718 Problem: Extra empty line between two virtual text "below" when 'wrap' and 'number' are set. Solution: Reset "before" when there is no text in the screen line. (closes #11334) Files: src/drawline.c, src/testdir/test_textprop.vim, src/testdir/dumps/Test_prop_with_text_after_below_trunc_2.dump *** ../vim-9.0.0717/src/drawline.c 2022-10-10 20:33:22.061181595 +0100 --- src/drawline.c 2022-10-10 21:08:53.620564310 +0100 *************** *** 639,645 **** if (wrap || right || above || below || padding > 0 || n_used < *n_extra) { ! int col_off = win_col_off(wp) + win_col_off2(wp); int skip_add = 0; if (above) --- 639,645 ---- if (wrap || right || above || below || padding > 0 || n_used < *n_extra) { ! int col_off = win_col_off(wp) - win_col_off2(wp); int skip_add = 0; if (above) *************** *** 655,661 **** if (before < 0 || !(right || below) || (below ! ? (col_with_padding == 0 || !wp->w_p_wrap) : (n_used < *n_extra))) { if (right && (wrap || room < PROP_TEXT_MIN_CELLS)) --- 655,661 ---- if (before < 0 || !(right || below) || (below ! ? (col_with_padding <= col_off || !wp->w_p_wrap) : (n_used < *n_extra))) { if (right && (wrap || room < PROP_TEXT_MIN_CELLS)) *** ../vim-9.0.0717/src/testdir/test_textprop.vim 2022-10-10 19:50:19.482640200 +0100 --- src/testdir/test_textprop.vim 2022-10-10 21:06:47.324608921 +0100 *************** *** 2653,2658 **** --- 2653,2661 ---- let buf = RunVimInTerminal('-S XscriptPropsAfterTrunc', #{rows: 8, cols: 60}) call VerifyScreenDump(buf, 'Test_prop_with_text_after_below_trunc_1', {}) + call term_sendkeys(buf, ":set number\") + call VerifyScreenDump(buf, 'Test_prop_with_text_after_below_trunc_2', {}) + call StopVimInTerminal(buf) endfunc *** ../vim-9.0.0717/src/testdir/dumps/Test_prop_with_text_after_below_trunc_2.dump 2022-10-10 21:09:34.828549580 +0100 --- src/testdir/dumps/Test_prop_with_text_after_below_trunc_2.dump 2022-10-10 21:06:56.788605618 +0100 *************** *** 0 **** --- 1,8 ---- + | +0#af5f00255#ffffff0@1|1| |o+0#0000000&|n|a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d| |f|a|s| |d|f|t+0#e000e06&|h|e| |q|u|i|c|k| |b|r|o|w|n| |f|o|x| |j|u|m|… + | +0#af5f00255&@3|t+0#e000e06&|h|e| |q|u|i|c|k| |b|r|o|w|n| |f|o|x| |j|u|m|p|s| |o|v|e|r| |t|h|e| |l|a|z|y| |d|o|g| +0#0000000&@12 + | +0#af5f00255&@1|2| |t+0#0000000&|w>o| @52 + |~+0#4040ff13&| @58 + |~| @58 + |~| @58 + |~| @58 + |:+0#0000000&|s|e|t| |n|u|m|b|e|r| @30|2|,|3| @10|A|l@1| *** ../vim-9.0.0717/src/version.c 2022-10-10 20:33:22.061181595 +0100 --- src/version.c 2022-10-10 21:05:02.452645091 +0100 *************** *** 701,702 **** --- 701,704 ---- { /* Add new patch number below this line */ + /**/ + 718, /**/ -- WOMAN: King of the who? ARTHUR: The Britons. WOMAN: Who are the Britons? ARTHUR: Well, we all are. we're all Britons and I am your king. The Quest for the Holy Grail (Monty Python) /// 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 ///