To: vim_dev@googlegroups.com Subject: Patch 9.0.0690 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0690 Problem: Buffer size for expanding tab not correctly computed. Solution: Correctly use size of end character. Files: src/drawline.c *** ../vim-9.0.0689/src/drawline.c 2022-10-06 21:24:30.537632966 +0100 --- src/drawline.c 2022-10-08 11:13:08.205027819 +0100 *************** *** 2805,2813 **** // If wlv.n_extra > 0, it gives the number of chars, to // use for a tab, else we need to calculate the width // for a tab. ! len = (tab_len * mb_char2len(wp->w_lcs_chars.tab2)); if (wp->w_lcs_chars.tab3) ! len += mb_char2len(wp->w_lcs_chars.tab3); if (wlv.n_extra > 0) len += wlv.n_extra - tab_len; c = wp->w_lcs_chars.tab1; --- 2805,2814 ---- // If wlv.n_extra > 0, it gives the number of chars, to // use for a tab, else we need to calculate the width // for a tab. ! int tab2_len = mb_char2len(wp->w_lcs_chars.tab2); ! len = tab_len * tab2_len; if (wp->w_lcs_chars.tab3) ! len += mb_char2len(wp->w_lcs_chars.tab3) - tab2_len; if (wlv.n_extra > 0) len += wlv.n_extra - tab_len; c = wp->w_lcs_chars.tab1; *** ../vim-9.0.0689/src/version.c 2022-10-07 22:46:03.686771713 +0100 --- src/version.c 2022-10-08 11:15:14.272724692 +0100 *************** *** 701,702 **** --- 701,704 ---- { /* Add new patch number below this line */ + /**/ + 690, /**/ -- You were lucky to have a LAKE! There were a hundred and sixty of us living in a small shoebox in the middle of the road. /// 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 ///