Merge pull request #13664 from ivechan/win_exectute

vim-patch:8.1.{1418,1425,1832,2124},8.2.{0137, 2340}
This commit is contained in:
Jan Edmund Lazo
2021-05-07 08:34:28 -04:00
committed by GitHub
8 changed files with 166 additions and 13 deletions

View File

@@ -54,7 +54,7 @@ void nvim_win_set_buf(Window window, Buffer buffer, Error *err)
return;
}
if (switch_win(&save_curwin, &save_curtab, win, tab, false) == FAIL) {
if (switch_win_noblock(&save_curwin, &save_curtab, win, tab, false) == FAIL) {
api_set_error(err,
kErrorTypeException,
"Failed to switch to window %d",
@@ -74,7 +74,7 @@ void nvim_win_set_buf(Window window, Buffer buffer, Error *err)
// So do it now.
validate_cursor();
restore_win(save_curwin, save_curtab, false);
restore_win_noblock(save_curwin, save_curtab, false);
}
/// Gets the (1,0)-indexed cursor position in the window. |api-indexing|