Merge pull request #14531 from janlazo/revert-noblock

Revert "api/window: use the "noblock" variants in nvim_win_set_buf"
This commit is contained in:
Jan Edmund Lazo 2021-05-31 21:57:44 -04:00 committed by GitHub
commit e8f0ff1d48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ void nvim_win_set_buf(Window window, Buffer buffer, Error *err)
return;
}
if (switch_win_noblock(&save_curwin, &save_curtab, win, tab, false) == FAIL) {
if (switch_win(&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_noblock(save_curwin, save_curtab, false);
restore_win(save_curwin, save_curtab, false);
}
/// Gets the (1,0)-indexed cursor position in the window. |api-indexing|