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

Turning off mouse mode leaves terminal in a broken state #6638

Closed
m-c-g opened this issue Apr 7, 2023 · 1 comment · Fixed by #6675
Closed

Turning off mouse mode leaves terminal in a broken state #6638

m-c-g opened this issue Apr 7, 2023 · 1 comment · Fixed by #6675
Assignees
Labels
C-bug Category: This is a bug

Comments

@m-c-g
Copy link

m-c-g commented Apr 7, 2023

Summary

Setting mouse = false and reloading the config and then exiting breaks mouse handling in the terminal.

Clicking or moving the mouse after quitting sends codes to the command line. Removing the line from config and reloading will stop this behaviour but doesn't seem to fully restore the terminals mouse handling; text selection no longer works the way it should.

This is happening with Ubuntu running in VMFusion on a M1 mac using the Tilix terminal.
I also checked this using the byobu terminal and saw the same behavior

This doesn't happen in MacOS running in the Warp terminal.

Could this be a problem with Helix or is it something with VMWare?

Reproduction Steps

I tried this:

  1. hx

I expected this to happen:

Instead, this happened:

Helix log

~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines

Platform

Linux on VMWare Fusion

Terminal Emulator

Tilix. Byobu

Helix Version

helix 23.03

@m-c-g m-c-g added the C-bug Category: This is a bug label Apr 7, 2023
@the-mikedavis
Copy link
Member

Currently we look at the editor.mouse setting when claiming and restoring the terminal only (which happens when we start and exit Helix respectively). So I think what's happening here is that we start Helix with mouse support enabled, we tell the terminal emulator that we want to capture mouse inputs. Then if you reconfigure editor.mouse to false, we don't tell the terminal to disable mouse event capture. I can't reproduce this in Kitty or WezTerm so I think it may be Tilix specific. I'm guessing that most terminals disable mouse events when the running application exits raw mode. I think it should be possible to fix this by sending DisableMouseCapture or EnableMouseCapture when the config changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants