fillchars: fix display on closed fold

The rollback of the last written symbol was not thorough, hence
confusing the code later on and causing a buggy display.

To reproduce, use `set fillchars+=foldopen:▾,foldsep:│` and close a
fold. Foldcolumn should display a glitch.
This commit is contained in:
Matthieu Coudron
2020-01-14 22:51:11 +01:00
parent 9231684986
commit 53473b3b71

View File

@@ -2123,11 +2123,11 @@ fill_foldcolumn(
if (closed) {
if (symbol != 0) {
// rollback length
// rollback previous write
char_counter -= len;
memset(&p[char_counter], ' ', len);
}
symbol = wp->w_p_fcs_chars.foldclosed;
len = utf_char2bytes(symbol, &p[char_counter]);
len = utf_char2bytes(wp->w_p_fcs_chars.foldclosed, &p[char_counter]);
char_counter += len;
}