diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-02-15 16:53:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-15 16:53:53 +0800 |
commit | ae7653b74cfd373dbafe84c913f8b1b5a006670d (patch) | |
tree | ce9641042c0408d270a56f06ff4a91ca05c04179 /src | |
parent | 8307ed3a194d0c0420feb0b3e5c2f6919095415f (diff) | |
download | rneovim-ae7653b74cfd373dbafe84c913f8b1b5a006670d.tar.gz rneovim-ae7653b74cfd373dbafe84c913f8b1b5a006670d.tar.bz2 rneovim-ae7653b74cfd373dbafe84c913f8b1b5a006670d.zip |
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 (limited to 'src')
-rw-r--r-- | src/nvim/drawscreen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c index 2c0b6ea3b0..0ac5220599 100644 --- 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 |