1
0
forked from aniani/vim

patch 8.1.1850: focus may remain in popup window

Problem:    Focus may remain in popup window.
Solution:   Change focus if needed.
This commit is contained in:
Bram Moolenaar
2019-08-15 21:34:34 +02:00
parent 9bca58f36d
commit 5dd143e223
2 changed files with 8 additions and 1 deletions

View File

@@ -814,7 +814,7 @@ pum_set_selected(int n, int repeat)
* update the view on the buffer. Only go back to * update the view on the buffer. Only go back to
* the window when needed, otherwise it will always be * the window when needed, otherwise it will always be
* redraw. */ * redraw. */
if (resized) if (resized && win_valid(curwin_save))
{ {
++no_u_sync; ++no_u_sync;
win_enter(curwin_save, TRUE); 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 #endif
} }

View File

@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1850,
/**/ /**/
1849, 1849,
/**/ /**/