-
Notifications
You must be signed in to change notification settings - Fork 24
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
Cursor never moves forward when mixing autocomplete and emoji #1
Comments
Hmm, another weird bug with emoji. I don't have zsh installed, but I'm using fish, which has autocomplete builtin. Anyway, I tested in kmscon, gtktsm, and also in non-libtsm-based konsole, just to see how does it behave. Despite some font and other cursor placement issues, I can't reproduce the exact issue you described. Probably due to the way zsh implementing autocomplete is different from fish? |
Just tried, and I can't reproduce it in fish either. Xonsh is another shell where this problem comes up. |
I currently have few spare time to investigate this. Pull requests are welcomed. |
Hmm, looks like the problem is basically with Out of curiosity: is there a reason libtsm doesn't just use POSIX's wcwidth? For all practical purposes, on Unix platforms, it's usually UTF-32/UCS4 anyway. There's also a wcwidth implementation that Termux uses... |
It's on the original author's to-do list for a while... Anyway, I tried the I pushed the code to |
@Aetf I believe this is this Fish bug, as I can reproduce it in Sakura and URxvt, too. One of the comments seems to suggest that this happens when the terminal emulator's Maybe there could be a runtime setting for this? Some kind of global function ( |
Yeah, I saw that bug a while ago when I was messing around with emojis in Konsole. Having a switch for wcwidth isn't going to help here, as fish also uses its internal copy of Another way is to force fish emoji width to 2 using Does the |
Yup, it fixes the original issue. I guess Xonsh works now since Python probably has its own wcwidth. |
Xonsh works with new wcwidth. I've tried that. Fix merged in #8 |
Yes, this is a weird-as-crud bug. I found it while working on my terminal emulator.
Basically:
Make sure you're using a shell that tries to autocomplete your history by showing a shadowed version right after the normal text. This includes stuff like Xonsh or zsh + oh my zsh. If that doesn't make sense, here's a screenshot:
Notice the shadowed autocomplete text.
Open up a normal terminal emulator (or pretty much any one that supports copy/paste) and paste the following line:
Now that it's been saved to your history, open up gtktsm or any other terminal emulator that uses libtsm. When you enter the letter e and the autocomplete fills in the rest of the line, the cursor will never move forward. Hit backspace, e, backspace, e, over and over again, and you can literally erase the entire line.
This is weird...
The text was updated successfully, but these errors were encountered: