Skip to content

popup: terminal embedded in an opacity popup freezes Vim on input#20220

Closed
h-east wants to merge 1 commit into
vim:masterfrom
h-east:fix_popup_opacity_term_freeze
Closed

popup: terminal embedded in an opacity popup freezes Vim on input#20220
h-east wants to merge 1 commit into
vim:masterfrom
h-east:fix_popup_opacity_term_freeze

Conversation

@h-east
Copy link
Copy Markdown
Member

@h-east h-east commented May 14, 2026

Problem:  When a terminal buffer is shown inside a popup with 'opacity'
          set to a value other than 100, typing into it freezes Vim.
          Only the first keystroke is drawn; afterwards no input is
          processed and the screen stops updating.
Solution: When marking background lines for redraw to keep opacity
          blend cells fresh, do not raise must_redraw.  This marking
          happens from inside update_screen() (via
          may_update_popup_mask()), so raising must_redraw makes
          terminal_loop()'s "while (must_redraw != 0) update_screen()"
          loop never terminate.  Add redraw_win_range_now() that
          updates only the per-window state and use it from
          redraw_win_under_opacity_popup().

Fixes: #20214

Problem:  When a terminal buffer is shown inside a popup with 'opacity'
          set to a value other than 100, typing into it freezes Vim.
          Only the first keystroke is drawn; afterwards no input is
          processed and the screen stops updating.
Solution: When marking background lines for redraw to keep opacity
          blend cells fresh, do not raise must_redraw.  This marking
          happens from inside update_screen() (via
          may_update_popup_mask()), so raising must_redraw makes
          terminal_loop()'s "while (must_redraw != 0) update_screen()"
          loop never terminate.  Add redraw_win_range_now() that
          updates only the per-window state and use it from
          redraw_win_under_opacity_popup().

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chrisbra
Copy link
Copy Markdown
Member

thanks

@chrisbra chrisbra closed this in f281493 May 15, 2026
@h-east h-east deleted the fix_popup_opacity_term_freeze branch May 15, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setting opacity in popup with a terminal freeze vim

2 participants