comparison src/popupmnu.c @ 17706:431d52b7f7d3 v8.1.1850

patch 8.1.1850: focus may remain in popup window commit https://github.com/vim/vim/commit/5dd143e22333a1c320fcf330f6c5061269bd1a17 Author: Bram Moolenaar <Bram@vim.org> 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 15 Aug 2019 21:45:04 +0200
parents 8a095d343c59
children c75da1064e33
comparison
equal deleted inserted replaced
17705:6c4ed21e4883 17706:431d52b7f7d3
812 812
813 /* When the preview window was resized we need to 813 /* When the preview window was resized we need to
814 * update the view on the buffer. Only go back to 814 * update the view on the buffer. Only go back to
815 * the window when needed, otherwise it will always be 815 * the window when needed, otherwise it will always be
816 * redraw. */ 816 * redraw. */
817 if (resized) 817 if (resized && win_valid(curwin_save))
818 { 818 {
819 ++no_u_sync; 819 ++no_u_sync;
820 win_enter(curwin_save, TRUE); 820 win_enter(curwin_save, TRUE);
821 --no_u_sync; 821 --no_u_sync;
822 update_topline(); 822 update_topline();
842 pum_do_redraw = FALSE; 842 pum_do_redraw = FALSE;
843 call_update_screen = FALSE; 843 call_update_screen = FALSE;
844 } 844 }
845 } 845 }
846 } 846 }
847 # ifdef FEAT_TEXT_PROP
848 if (WIN_IS_POPUP(curwin))
849 // can't keep focus in a popup window
850 win_enter(firstwin, TRUE);
851 # endif
847 } 852 }
848 #endif 853 #endif
849 } 854 }
850 855
851 if (!resized) 856 if (!resized)