-
Notifications
You must be signed in to change notification settings - Fork 178
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
Panic when search starts with underscore #441
Comments
Hey @ragne, thanks for reporting this issue. Are you seeing it when you type on the command line and hit ctrl-r, or when you're in the mcfly UI? I can't reproduce on either in fuzzy and non-fuzzy mode on my Mac. |
Hey @cantino, thanks for the response. let mut file = std::fs::File::create("/tmp/mcflylog.txt").unwrap();
write!(file, "***\n");
write!(file, "Cmd: {:?}, start: {}, end: {}", &command.cmd.as_bytes(), start, end);
write!(file, "***\n"); And got this output:
The start of the array is a valid utf-8 codepoint (U+2502) which is yet another way to represent the vertical bar I think (but I might be wrong) that the problem comes from this method. If I put some prints around println!("{:?}, cmd: {:?}", &self.matches, &self.input.command);
self.matches = ...
println!("after: {:?}", &self.matches); it then would output:
So if you have time you can probably create an empty db and use that string with "Box Drawings Light Vertical" symbol to replicate that. For freshly cloned master branch the repro is simple as Sorry, I don't have time yet to produce a fresh history db to easy the reproduction. For me the bug isn't that impactful, so please don't focus too hard on it. I believe it's unique to my history/set-up, so it might be rarely (if ever) encountered "in the wild". P.S. I have no idea if it's possible to force GH not to use horizontal scroll bar for code blocks :\ |
Hi, I'm running mcfly on
and simply invoking it with zsh binding (ctrl+r) and searching for anything that starts with underscore
_
panics withthread 'main' panicked at src/interface.rs:1008:51:
Sorry I don't have much time right now to look at the what exactly causes that, I can look in a week if no one pics that up.
The best backtrace i could get is this one:
This is reformatted, so i hope i didn't butcher it while doing so
The text was updated successfully, but these errors were encountered: