Mercurial > vim
diff src/mouse.c @ 19265:ce8c47ed54e5 v8.2.0191
patch 8.2.0191: cannot put a terminal in a popup window
Commit: https://github.com/vim/vim/commit/219c7d063823498be22aae46dd024d77b5fb2a58
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 1 21:57:29 2020 +0100
patch 8.2.0191: cannot put a terminal in a popup window
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Feb 2020 22:00:04 +0100 |
parents | 49b78d6465e5 |
children | 22f0dda71638 |
line wrap: on
line diff
--- 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).