Patch 8.2.2815

7 views
Skip to first unread message

Bram Moolenaar

unread,
Apr 27, 2021, 2:09:27 PM4/27/21
to vim...@googlegroups.com

Patch 8.2.2815
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)
Files: src/popupmenu.c


*** ../vim-8.2.2814/src/popupmenu.c 2021-04-23 21:01:30.649469081 +0200
--- src/popupmenu.c 2021-04-27 20:03:42.827771425 +0200
***************
*** 925,930 ****
--- 925,932 ----
|| (curtab != curtab_save
&& valid_tabpage(curtab_save)))
{
+ int save_redr_status;
+
if (curtab != curtab_save && valid_tabpage(curtab_save))
goto_tabpage_tp(curtab_save, FALSE, FALSE);

***************
*** 953,965 ****
--- 955,974 ----
// Update the screen before drawing the popup menu.
// Enable updating the status lines.
pum_pretend_not_visible = TRUE;
+
// But don't draw text at the new popup menu position,
// it causes flicker. When resizing we need to draw
// anyway, the position may change later.
+ // Also do not redraw the status line of the original
+ // current window here, to avoid it gets drawn with
+ // StatusLineNC for a moment and cause flicker.
pum_will_redraw = !resized;
+ save_redr_status = curwin_save->w_redr_status;
+ curwin_save->w_redr_status = FALSE;
update_screen(0);
pum_pretend_not_visible = FALSE;
pum_will_redraw = FALSE;
+ curwin_save->w_redr_status = save_redr_status;

if (!resized && win_valid(curwin_save))
{
*** ../vim-8.2.2814/src/version.c 2021-04-26 21:34:43.708519638 +0200
--- src/version.c 2021-04-27 20:03:18.975849228 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2815,
/**/

--
hundred-and-one symptoms of being an internet addict:
183. You move your coffeemaker next to your computer.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages