-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Crash when switching to window that was in insert mode and switched away from by mouse. #3090
Comments
Seems to be #2051 |
Yeah let's close in favor of #2051 |
This falls into the same It's possible to reproduce this from another angle by changing the Instead, the |
Hmm, a potential fix is to always look up the same document: the one that was current at the start of handle_event. I wonder if this would have any edge cases though (like the completion not being cleared anymore). |
Actually, we should probably switch documents back to normal mode if they lose focus, I do also wonder if mode should be editor-wide rather than per document. |
Yeah, I feel like making modes editor-wide makes the most sense. At least, I can't think of any situation where you would want different modes in different documents. |
On a side note, Helix reacts as follow, while fed by pipe:
This is unexpected behavior. It should react exactly as is the same keystrokes were send by the user. Eq:
|
Summary
If you have two sub-windows open in Helix with different files, enter insert mode on one of them, switch to the other sub-window via mouse support, and then switch back to the first with keybindings, Helix crashes with the following backtrace:
Reproduction Steps
Causing the crash is easy and reliable:
space w v
).i
) on the first window.Note: it's important that the files in each window be different files. Loading the same file or having the scratch buffer in both doesn't cause the a crash.
Helix log
No response
Platform
Linux (NixOS 22.05)
Terminal Emulator
xfce4-terminal
Helix Version
Descovered on
helix 22.05 (27609f50)
, confirmed to still be present on latest masterad15e7b5e8918e1521683c7f5c63d77e00c58023
The text was updated successfully, but these errors were encountered: