Visitar URL original
completion menu flickers when selecting an item with an info popup by h-east · Pull Request #21433 · vim/vim · GitHub
Skip to content

completion menu flickers when selecting an item with an info popup - #21433

Open
h-east wants to merge 1 commit into
vim:masterfrom
h-east:pum-info-hidden-flicker
Open

h-east wants to merge 1 commit into
vim:masterfrom
h-east:pum-info-hidden-flicker

Conversation

@h-east

@h-east h-east commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor
Problem:  The completion menu flickers when selecting an item creates the
          info popup, and on every selection when there is no room for
          the info popup.
Solution: Do not clear to the end of a screen line with T_CE when the
          popup menu covers part of it.  Do not handle creating the info
          popup as splitting a window.

Selecting an item redraws the text under the menu. screen_fill() skips
the cells under the menu, but the T_CE shortcut clears them and the
menu is drawn again. T_CE is not used while a popup window is visible,
so this only happened when the info popup was hidden for lack of room.

prepare_tagpreview() returned TRUE when it created the info popup, and
pum_set_selected() took that as a resized window: the text under the
menu was drawn over it. Creating a popup does not change the window
layout.

AI assistance

  • AI involvement is disclosed in the commit message

Checklist

  • The commit message follows the Problem/Solution form above
  • Signed-off-by: trailer is present (git commit -s)
  • Tests were added
  • No documentation update is needed

@h-east
h-east force-pushed the pum-info-hidden-flicker branch from c0acd89 to 18f107c Compare October 3, 2026 04:05
@h-east h-east changed the title completion menu flickers when there is no room for the info popup completion menu flickers when selecting an item with an info popup Oct 3, 2026
@h-east

h-east commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

The Linux ASAN failure in Test_termdebug_tbreak is not related to this
PR. The same test fails on master too.

Problem:  The completion menu flickers when selecting an item creates the
          info popup, and on every selection when there is no room for
          the info popup.
Solution: Do not clear to the end of a screen line with T_CE when the
          popup menu covers part of it.  Do not handle creating the info
          popup as splitting a window.

Selecting an item redraws the text under the menu.  screen_fill() skips
the cells under the menu, but the T_CE shortcut clears them and the
menu is drawn again.  T_CE is not used while a popup window is visible,
so this only happened when the info popup was hidden for lack of room.

prepare_tagpreview() returned TRUE when it created the info popup, and
pum_set_selected() took that as a resized window: the text under the
menu was drawn over it.  Creating a popup does not change the window
layout.

Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
@h-east
h-east force-pushed the pum-info-hidden-flicker branch from 18f107c to 0830944 Compare October 5, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant