diff src/drawline.c @ 18502:3ebb15e3c28d v8.1.2245

patch 8.1.2245: third character of 'listchars' tab shows in wrong place Commit: https://github.com/vim/vim/commit/2f7b7b1e123d505637d21e0df28eb9e92667479c Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 3 15:46:48 2019 +0100 patch 8.1.2245: third character of 'listchars' tab shows in wrong place Problem: Third character of 'listchars' tab shows in wrong place when 'breakindent' is set. Solution: Set c_final to NUL. (Naruhiko Nishino, closes #5165)
author Bram Moolenaar <Bram@vim.org>
date Sun, 03 Nov 2019 16:00:04 +0100
parents 04a40c1514c4
children 0ac88fdbf089
line wrap: on
line diff
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -1173,6 +1173,7 @@ win_line(
 # endif
 		    p_extra = NULL;
 		    c_extra = ' ';
+		    c_final = NUL;
 		    n_extra = get_breakindent_win(wp,
 				       ml_get_buf(wp->w_buffer, lnum, FALSE));
 		    // Correct end of highlighted area for 'breakindent',
@@ -1647,9 +1648,8 @@ win_line(
 #ifdef FEAT_LINEBREAK
 	    int c0;
 #endif
+	    VIM_CLEAR(p_extra_free);
 
-	    if (p_extra_free != NULL)
-		VIM_CLEAR(p_extra_free);
 	    // Get a character from the line itself.
 	    c = *ptr;
 #ifdef FEAT_LINEBREAK