vim-patch:8.0.0126

Problem:    Display problem with 'foldcolumn' and a wide character.
            (esiegerman)
Solution:   Don't use "extra" but an allocated buffer. (Christian Brabandt,
            closes vim/vim#1310)

6270660611
This commit is contained in:
Justin M. Keyes
2017-07-29 02:26:21 +02:00
parent df02f9cc37
commit 1bcb3ed0e2
3 changed files with 50 additions and 8 deletions

View File

@@ -2705,13 +2705,18 @@ win_line (
draw_state = WL_FOLD;
if (fdc > 0) {
// Draw the 'foldcolumn'.
fill_foldcolumn(extra, wp, false, lnum);
n_extra = fdc;
p_extra = extra;
p_extra[n_extra] = NUL;
c_extra = NUL;
char_attr = win_hl_attr(wp, HLF_FC);
// Draw the 'foldcolumn'. Allocate a buffer, "extra" may
// already be in used.
p_extra_free = xmalloc(12 + 1);
if (p_extra_free != NULL) {
fill_foldcolumn(p_extra_free, wp, false, lnum);
n_extra = fdc;
p_extra_free[n_extra] = NUL;
p_extra = p_extra_free;
c_extra = NUL;
char_attr = win_hl_attr(wp, HLF_FC);
}
}
}