# HG changeset patch # User Bram Moolenaar # Date 1565898304 -7200 # Node ID 431d52b7f7d32695f30ef00cfa49b1a40bbb813f # Parent 6c4ed21e488312599b3facec9e515f01523a57da patch 8.1.1850: focus may remain in popup window commit https://github.com/vim/vim/commit/5dd143e22333a1c320fcf330f6c5061269bd1a17 Author: Bram Moolenaar Date: Thu Aug 15 21:34:34 2019 +0200 patch 8.1.1850: focus may remain in popup window Problem: Focus may remain in popup window. Solution: Change focus if needed. diff --git a/src/popupmnu.c b/src/popupmnu.c --- 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 --- 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,