Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling redraw clears inputlist() choices #32068

Open
lithammer opened this issue Jan 17, 2025 · 2 comments
Open

Calling redraw clears inputlist() choices #32068

lithammer opened this issue Jan 17, 2025 · 2 comments
Labels
bug issues reporting wrong behavior cmdline-mode command line, also cmdwin ui
Milestone

Comments

@lithammer
Copy link
Contributor

Problem

When redraw is called async(?), it will clear the choices presented by inputlist().

Before redraw:

Image

After:

Image

Some related issues:

Steps to reproduce

nvim --clean --noplugin
:lua vim.defer_fn(vim.cmd.redraw, 5000)
:call inputlist(['Select color:', '1. red', '2. green', '3. blue'])

Wait for the deferred redraw to kick in. Seems to be the same for Vim using timer_start except worse (everything just goes blank).

Expected behavior

I expect the choices to still be present after redraw.

Nvim version (nvim -v)

v0.11.0-dev-1557+ga78eddd541-Homebrew

Vim (not Nvim) behaves the same?

9.1.1000

Operating system/version

macOS 15.1.1

Terminal name/version

Ghostty 72d08552

$TERM environment variable

xterm-ghostty

Installation

Homebrew (brew install --head neovim)

@luukvbaal
Copy link
Member

Semi-regression from #31525; same issue was already present for input(). Issue is not present with the proposed default ext_ui in #27855. Not easily solvable for the message grid, can try if we must. "Workaround" would be of course not to redraw (when is redrawing in cmdline mode useful?).

@lithammer
Copy link
Contributor Author

"Workaround" would be of course not to redraw

It's how I solved it for now (i.e. set smear_to_cmd = false in smear-cursor.nvim).

when is redrawing in cmdline mode useful?

Seems to be needed to animate the cursor when it's moved to the cmdline, see sphamba/smear-cursor.nvim#82 (comment).

@zeertzjq zeertzjq added ui cmdline-mode command line, also cmdwin labels Jan 17, 2025
@justinmk justinmk added this to the backlog milestone Jan 20, 2025
rockyzhang24 added a commit to rockyzhang24/dotfiles that referenced this issue Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior cmdline-mode command line, also cmdwin ui
Projects
None yet
Development

No branches or pull requests

4 participants