fix(api): dont change curwin for nvim_win_set_width

This commit is contained in:
Folke Lemaitre 2023-06-01 12:42:06 +02:00
parent 68e7a6a6dc
commit 1ff4562502
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040

View File

@ -209,13 +209,8 @@ void nvim_win_set_width(Window window, Integer width, Error *err)
return;
}
win_T *savewin = curwin;
curwin = win;
curbuf = curwin->w_buffer;
try_start();
win_setwidth((int)width);
curwin = savewin;
curbuf = curwin->w_buffer;
win_setwidth_win((int)width, win);
try_end(err);
}