-
Notifications
You must be signed in to change notification settings - Fork 14
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
[FIX] Ctrl+arrow keys navigation fixed #22
base: master
Are you sure you want to change the base?
Conversation
Same problem over here :) But I think that [8] pry(main)> print "12345\e[1D"
1234=> nil
[9] pry(main)> print "123456\e[5D"
1=> nil |
This fix will not be enough, you can see in my pull request. But better look into m first commit, there is CORRECT solution, your one will not works correcnt in case of buffer length. |
@kvokka Do you mean that your fix or the fix in #23 is not good enough? @arlimus 's fix seems to work for me, and is a less invasive change. It seems undesirable to insert delays into the input process, especially since coolline itself also adds some delay for syntax highlighting. Could you explain why your fix is necessary/better? Thanks! |
I've done it because ih @arlimus implementation you will get bug outpt with long press. Try to paste 300-500 symbols snippet od text (with spaces of course) and nav it with his method, holdind the cthl+arrow buttons and you will get '5D' and '5E' symbols as artifact, that was not readed from buffer and pushed to console input. I tried to add the delay for preventing this artifacts, but got too slow working with bigger parts of code. Now I had to cut coolline, but I'll be very happy to use it againg (if it will works ;) |
Hmm I don't experience that actually, though pasting in long strings of text is generally pretty slow with coolline enabled, even without the extra delay. But I haven't seen the 5D/5E artifacts with @arlimus 's fix even with a long string of text. |
Bug will be raided not after insert, but after navigating on the string. Copy this message(maybe twice), for example, and then try to go back and forward on it with ctrl+arrows. after few times you'll get the bug. And it is really annoying, is you have to deal will long sql queries. |
In pry you get 5D or 5C symbols, when try move over the line by ctrl+arrow keys.
This will fix it