summaryrefslogtreecommitdiff
path: root/src/mouse.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-02-01 21:57:29 +0100
committerBram Moolenaar <Bram@vim.org>2020-02-01 21:57:29 +0100
commit219c7d063823498be22aae46dd024d77b5fb2a58 (patch)
treed6e8c1a525626c2e7224271ee8113cf81c7839d9 /src/mouse.c
parentab067a21b9622513ed75f4801b001606eeaf2474 (diff)
downloadvim-git-219c7d063823498be22aae46dd024d77b5fb2a58.tar.gz
patch 8.2.0191: cannot put a terminal in a popup windowv8.2.0191
Problem: Cannot put a terminal in a popup window. Solution: Allow opening a terminal in a popup window. It will always have keyboard focus until closed.
Diffstat (limited to 'src/mouse.c')
-rw-r--r--src/mouse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mouse.c b/src/mouse.c
index c94f3228f..5b468d63f 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -1736,6 +1736,11 @@ retnomove:
# endif
}
#endif
+#if defined(FEAT_PROP_POPUP) && defined(FEAT_TERMINAL)
+ if (popup_is_popup(curwin) && curbuf->b_term != NULL)
+ // terminal in popup window: don't jump to another window
+ return IN_OTHER_WIN;
+#endif
// Only change window focus when not clicking on or dragging the
// status line. Do change focus when releasing the mouse button
// (MOUSE_FOCUS was set above if we dragged first).