fix(api): dont change curwin for nvim_win_set_height

This commit is contained in:
Folke Lemaitre 2023-06-01 11:44:08 +02:00
parent 2bdef6dd2a
commit a3751f5de2
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040

View File

@ -167,13 +167,8 @@ void nvim_win_set_height(Window window, Integer height, Error *err)
return;
}
win_T *savewin = curwin;
curwin = win;
curbuf = curwin->w_buffer;
try_start();
win_setheight((int)height);
curwin = savewin;
curbuf = curwin->w_buffer;
win_setheight_win((int)height, win);
try_end(err);
}