aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorScott Prager <splinterofchaos@gmail.com>2015-04-03 18:44:26 -0400
committerScott Prager <splinterofchaos@gmail.com>2015-04-05 13:39:55 -0400
commitb6296f4e84217adaa3326c715d4e2c82a105bc39 (patch)
treedf9775942fd195a36fdd1c309dbaf5b1b89a89e4 /src/nvim/edit.c
parenta69e464f70f1f26c352b713f70b627ea07232e79 (diff)
downloadrneovim-b6296f4e84217adaa3326c715d4e2c82a105bc39.tar.gz
rneovim-b6296f4e84217adaa3326c715d4e2c82a105bc39.tar.bz2
rneovim-b6296f4e84217adaa3326c715d4e2c82a105bc39.zip
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
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 8b2ac1943f..c60d987ddd 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -246,7 +246,7 @@ edit (
)
{
if (curbuf->terminal) {
- terminal_enter(curbuf->terminal, true);
+ terminal_enter(true);
return false;
}