From 53473b3b71def9cdb7753523345c2171701b6889 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 14 Jan 2020 22:51:11 +0100 Subject: fillchars: fix display on closed fold MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/nvim/screen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 0612575e67..34b775ba12 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -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; } -- cgit