-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Properly handle case where last character in a cancelled command begins a new command #6960
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking a stab at this! Looks good mostly just one thing I noticed. However I would like to see some integration tests here. The integration testing framework is actually really week suited for something like this. Just great a test that inputs key sequences where the first key is types twice (like ]]p
and check that the command is executed directly (so the selection moves in that example).
Thanks! I've updated to code to do the recursive call (locally) and am working on the integration tests now. |
I've updated the code to make the recursive call and added two test cases to |
I think this might be a bug with the integration testing Framework. It seems that CC @dead10ck |
I actually think that in addition to the integration test problem, there's unexpected behavior associated with my code here. I've been running this code for a bit and a weird thing is that when I type |
This is actually intentional, see #6156. It's a somewhat hacky way to be able to explicitly express the cursor being at the end of the line, on the EOF. I'm open to suggestions, if you can think of any ideas for a better way to do this. |
Hmm I see, I will try to thinm of omething but nothing comes to mind right now. If just a single line ending si removed would just adding an extra newline |
Yes it would. I did that in a few tests when I made the change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change itself looks good to me, just needs that fix for the test. Thanks!
test(( | ||
"#[|f]#oo\n\nbar", | ||
"]]p", | ||
helpers::platform_line("#[foo\n|]#\nbar"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, a quick workaround for this would just be too add another \n
, or express this with a multi line string literal.
FWIW, tested this on my end, checked out @sscheele's branch and this worked 👍 |
Closes #6878