mirror of
https://github.com/neovim/neovim.git
synced 2026-05-01 03:24:49 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user