diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-15 21:34:34 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-15 21:34:34 +0200 |
commit | 5dd143e22333a1c320fcf330f6c5061269bd1a17 (patch) | |
tree | 297c72fe2bdb582e908d92fd5fe0e4b3c20b766f | |
parent | 9bca58f36d1f6a2ac0e4022caa5f355d39357a05 (diff) | |
download | vim-git-5dd143e22333a1c320fcf330f6c5061269bd1a17.tar.gz |
patch 8.1.1850: focus may remain in popup windowv8.1.1850
Problem: Focus may remain in popup window.
Solution: Change focus if needed.
-rw-r--r-- | src/popupmnu.c | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/popupmnu.c b/src/popupmnu.c index 9569ffdfc..2da720a40 100644 --- a/src/popupmnu.c +++ b/src/popupmnu.c @@ -814,7 +814,7 @@ pum_set_selected(int n, int repeat) * update the view on the buffer. Only go back to * the window when needed, otherwise it will always be * redraw. */ - if (resized) + if (resized && win_valid(curwin_save)) { ++no_u_sync; win_enter(curwin_save, TRUE); @@ -844,6 +844,11 @@ pum_set_selected(int n, int repeat) } } } +# ifdef FEAT_TEXT_PROP + if (WIN_IS_POPUP(curwin)) + // can't keep focus in a popup window + win_enter(firstwin, TRUE); +# endif } #endif } diff --git a/src/version.c b/src/version.c index 4a993dace..64a43beb6 100644 --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1850, +/**/ 1849, /**/ 1848, |