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 -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20221008101710.EC4451C0592%40moolenaar.net.