mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00:00
terminal: Handle loss of focus in event loop.
While in a terminal and insert mode, if an event caused loss of focus, nvim would stay in the terminal event loop causing an inconsistent view of internal state and/or segfault. Remove the "term" argument from terminal_enter() as it only makes sense to call it with curbuf->terminal. Terminate the loop when switched to a different buffer. fixes #2301
This commit is contained in:
@@ -246,7 +246,7 @@ edit (
|
||||
)
|
||||
{
|
||||
if (curbuf->terminal) {
|
||||
terminal_enter(curbuf->terminal, true);
|
||||
terminal_enter(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user