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

Text selection with zsh reset-prompt #7408

Closed
m12y opened this issue May 2, 2024 · 3 comments
Closed

Text selection with zsh reset-prompt #7408

m12y opened this issue May 2, 2024 · 3 comments
Labels

Comments

@m12y
Copy link

m12y commented May 2, 2024

I have my zsh config set up to refresh the prompt at regular intervals using reset-prompt. However whenever this refresh occurs, any text I have selected with my mouse in the kitty terminal becomes deselected. This occurs on both macOS (14.4.1) and Arch Linux. This does not occur in other terminal applications I've tried on macOS (default terminal application, iTerm) or Linux (alacritty), using the same zsh config.

Steps to reproduce the behavior:

  1. Use latest version of kitty with default config
  2. Use zsh with ~/.zshrc as
TRAPALRM() { zle .reset-prompt } # refresh prompt
TMOUT=1 # invoke TRAPALRM every second
  1. Select any text in the terminal. It will quickly become deselected, preventing copying for example.
@m12y m12y added the bug label May 2, 2024
@kovidgoyal
Copy link
Owner

This is by design, when the text in the screen changes selections are
cleared as they may no longer reflest the originally selected text.

@m12y
Copy link
Author

m12y commented May 2, 2024

Thanks for your reply. Is there any workaround or possibility to change this behaviour via config? It does make text selection unusable unlike the other terminal emulators I mentioned above.

@kovidgoyal kovidgoyal reopened this May 2, 2024
@m12y
Copy link
Author

m12y commented May 2, 2024

@kovidgoyal Thank you for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants