Skip to content

main: Move pending-input check before region_highlight reset#976

Open
rosborn wants to merge 1 commit intozsh-users:masterfrom
rosborn:fix/pending-input-highlight-flash
Open

main: Move pending-input check before region_highlight reset#976
rosborn wants to merge 1 commit intozsh-users:masterfrom
rosborn:fix/pending-input-highlight-flash

Conversation

@rosborn
Copy link
Copy Markdown

@rosborn rosborn commented Mar 28, 2026

When using cursor-click-to-move in ghostty, the syntax highlighting was being cleared while the cursor was being moved. See ghostty-org/ghostty#11750.

I managed to trace it down to zsh-syntax-highlighting clearing region_highlight before checking that there is pending input. When the terminal sends a rapid sequence of arrow keys, each keystroke triggers _zsh_highlight, which clears the highlights, detects more keys in the queue, and returns.

The fix moves the pending-input check before the region_highlight reset so that existing highlights are preserved.

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.

1 participant