mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
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.
This commit is contained in:
@@ -1552,7 +1552,7 @@ static void win_update(win_T *wp, DecorProviders *providers)
|
|||||||
wp->w_old_visual_col = 0;
|
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;
|
wp->w_cursorline = win_cursorline_standout(wp) ? wp->w_cursor.lnum : 0;
|
||||||
if (wp->w_p_cul) {
|
if (wp->w_p_cul) {
|
||||||
// Make sure that the cursorline on a closed fold is redrawn
|
// Make sure that the cursorline on a closed fold is redrawn
|
||||||
|
Reference in New Issue
Block a user