mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:9.0.0690: buffer size for expanding tab not correctly computed
Problem: Buffer size for expanding tab not correctly computed.
Solution: Correctly use size of end character.
a0789478f6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
361de6d54d
commit
a974d1511e
@ -2106,9 +2106,10 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool nochange,
|
|||||||
// If n_extra > 0, it gives the number of chars
|
// If n_extra > 0, it gives the number of chars
|
||||||
// to use for a tab, else we need to calculate the width
|
// to use for a tab, else we need to calculate the width
|
||||||
// for a tab.
|
// for a tab.
|
||||||
int len = (tab_len * utf_char2len(wp->w_p_lcs_chars.tab2));
|
int tab2_len = utf_char2len(wp->w_p_lcs_chars.tab2);
|
||||||
|
int len = tab_len * tab2_len;
|
||||||
if (wp->w_p_lcs_chars.tab3) {
|
if (wp->w_p_lcs_chars.tab3) {
|
||||||
len += utf_char2len(wp->w_p_lcs_chars.tab3);
|
len += utf_char2len(wp->w_p_lcs_chars.tab3) - tab2_len;
|
||||||
}
|
}
|
||||||
if (n_extra > 0) {
|
if (n_extra > 0) {
|
||||||
len += n_extra - tab_len;
|
len += n_extra - tab_len;
|
||||||
|
Loading…
Reference in New Issue
Block a user