neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit ae7653b74cfd373dbafe84c913f8b1b5a006670d
parent 8307ed3a194d0c0420feb0b3e5c2f6919095415f
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Wed, 15 Feb 2023 16:53:53 +0800

fix(win_update): don't use unintialized memory in edge case (#22266)

This fixes two clang warnings.

Using an unintialized "cursorline_fi" without assigning to it is not
something that should normally happen, and in case it happens it will
likely cause another redraw, but still don't use unintialized memory.
Diffstat:
Msrc/nvim/drawscreen.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c @@ -1552,7 +1552,7 @@ static void win_update(win_T *wp, DecorProviders *providers) wp->w_old_visual_col = 0; } - foldinfo_T cursorline_fi; + foldinfo_T cursorline_fi = { 0 }; wp->w_cursorline = win_cursorline_standout(wp) ? wp->w_cursor.lnum : 0; if (wp->w_p_cul) { // Make sure that the cursorline on a closed fold is redrawn