mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 01:08:20 +00:00
fix(api): set correct curbuf when temporarily changing curwin (#21371)
This is the same code change as 6c87bbb4e4
This commit is contained in:
@@ -169,9 +169,11 @@ void nvim_win_set_height(Window window, Integer height, Error *err)
|
||||
|
||||
win_T *savewin = curwin;
|
||||
curwin = win;
|
||||
curbuf = curwin->w_buffer;
|
||||
try_start();
|
||||
win_setheight((int)height);
|
||||
curwin = savewin;
|
||||
curbuf = curwin->w_buffer;
|
||||
try_end(err);
|
||||
}
|
||||
|
||||
@@ -214,9 +216,11 @@ void nvim_win_set_width(Window window, Integer width, Error *err)
|
||||
|
||||
win_T *savewin = curwin;
|
||||
curwin = win;
|
||||
curbuf = curwin->w_buffer;
|
||||
try_start();
|
||||
win_setwidth((int)width);
|
||||
curwin = savewin;
|
||||
curbuf = curwin->w_buffer;
|
||||
try_end(err);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user