Mercurial > vim
comparison src/popupmenu.c @ 24551:aa04faf1590d v8.2.2815
patch 8.2.2815: status line flickers when redrawing popup menu info
Commit: https://github.com/vim/vim/commit/b80d2fb0e7b9adec4cff1bc4e2d30635cb70502e
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 27 20:06:57 2021 +0200
patch 8.2.2815: status line flickers when redrawing popup menu info
Problem: Status line flickers when redrawing popup menu info.
Solution: Do not redraw the status line when the focus is in the popup
window. (issue #8144)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 27 Apr 2021 20:15:03 +0200 |
parents | a878e5e892cf |
children | 7b07f361b1d4 |
comparison
equal
deleted
inserted
replaced
24550:80ad0944dbe0 | 24551:aa04faf1590d |
---|---|
923 # endif | 923 # endif |
924 if ((curwin != curwin_save && win_valid(curwin_save)) | 924 if ((curwin != curwin_save && win_valid(curwin_save)) |
925 || (curtab != curtab_save | 925 || (curtab != curtab_save |
926 && valid_tabpage(curtab_save))) | 926 && valid_tabpage(curtab_save))) |
927 { | 927 { |
928 int save_redr_status; | |
929 | |
928 if (curtab != curtab_save && valid_tabpage(curtab_save)) | 930 if (curtab != curtab_save && valid_tabpage(curtab_save)) |
929 goto_tabpage_tp(curtab_save, FALSE, FALSE); | 931 goto_tabpage_tp(curtab_save, FALSE, FALSE); |
930 | 932 |
931 // When the first completion is done and the preview | 933 // When the first completion is done and the preview |
932 // window is not resized, skip the preview window's | 934 // window is not resized, skip the preview window's |
951 } | 953 } |
952 | 954 |
953 // Update the screen before drawing the popup menu. | 955 // Update the screen before drawing the popup menu. |
954 // Enable updating the status lines. | 956 // Enable updating the status lines. |
955 pum_pretend_not_visible = TRUE; | 957 pum_pretend_not_visible = TRUE; |
958 | |
956 // But don't draw text at the new popup menu position, | 959 // But don't draw text at the new popup menu position, |
957 // it causes flicker. When resizing we need to draw | 960 // it causes flicker. When resizing we need to draw |
958 // anyway, the position may change later. | 961 // anyway, the position may change later. |
962 // Also do not redraw the status line of the original | |
963 // current window here, to avoid it gets drawn with | |
964 // StatusLineNC for a moment and cause flicker. | |
959 pum_will_redraw = !resized; | 965 pum_will_redraw = !resized; |
966 save_redr_status = curwin_save->w_redr_status; | |
967 curwin_save->w_redr_status = FALSE; | |
960 update_screen(0); | 968 update_screen(0); |
961 pum_pretend_not_visible = FALSE; | 969 pum_pretend_not_visible = FALSE; |
962 pum_will_redraw = FALSE; | 970 pum_will_redraw = FALSE; |
971 curwin_save->w_redr_status = save_redr_status; | |
963 | 972 |
964 if (!resized && win_valid(curwin_save)) | 973 if (!resized && win_valid(curwin_save)) |
965 { | 974 { |
966 # ifdef FEAT_PROP_POPUP | 975 # ifdef FEAT_PROP_POPUP |
967 win_T *wp = curwin; | 976 win_T *wp = curwin; |