mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
Revert "api/window: use the "noblock" variants in nvim_win_set_buf"
This reverts commit 1def3d1542
.
Plugins may depend on catching the following events
when creating windows:
- BufWinEnter
- BufEnter
- BufLeave
Risky to introduce this breaking change on 0.5 release
when 0.5 release should be out by now.
https://github.com/asvetliakov/vscode-neovim/issues/632#issuecomment-837201224
This commit is contained in:
@@ -54,7 +54,7 @@ void nvim_win_set_buf(Window window, Buffer buffer, Error *err)
|
|||||||
return;
|
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,
|
api_set_error(err,
|
||||||
kErrorTypeException,
|
kErrorTypeException,
|
||||||
"Failed to switch to window %d",
|
"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.
|
// So do it now.
|
||||||
validate_cursor();
|
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|
|
/// Gets the (1,0)-indexed cursor position in the window. |api-indexing|
|
||||||
|
Reference in New Issue
Block a user