-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
"cd a\" raises exception (Windows) #2666
Comments
Micro encountered an error: runtime.boundsError runtime error: index out of range [0] with length 0 The go-shellquote pkg is supposed to just throw an error when the string it's trying to split ends with an escape character. It works for an unended quotation mark like it's supposed to, but micro crashes every time when you end the cd command with a backslash escape. Looking into it |
The crash has been introduced with the only commit added to the fork, where the out of bounds access takes place instead of checking the input length, finalize the string via with the instruction within the Fixing this isn't that hard, but unfortunately we can't do this by our own due to the lack of permissions there. @zyedidia: |
Description of the problem or steps to reproduce
Type Ctrl+E,
cd a\
, and Enter. Micro immediately terminates:This is especially troubling since the cd command auto-completes directories with the terminal backslash that causes it to break.
Specifications
Version: 2.0.11
Commit hash: 225927b
Compiled on August 01, 2022
OS: Windows 11
Terminal: mintty 3.6.2 (x86_64-pc-msys) / git bash
The text was updated successfully, but these errors were encountered: