-
Notifications
You must be signed in to change notification settings - Fork 97
Tab completion problem #3
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
Comments
What OS and terminal emulator are you running, so I can try to reproduce the issue? |
@frmendes I am using OSX El Capitan 10.11.5 (15F34). The emulator is the terminal.app (? |
@terry182 I can't seem to reproduce it. I have the same OS version and tried on Terminal.app. It works on both Terminal and iTerm2 on my end. Can you try and disable other plugins you have (preferably one at a time) to see if there's some side effect created by the theme? |
@frmendes I didn't use any plugin as I just clean install my Macbook. But I notice that I am just using it as a theme, will that be the problem? I just download the FYI, I reproduce the result by pressing |
I found the problem happens to be the international setting I guess this issue can be closed. |
@frmendes it seems that tab completion adds a character to the sentence |
Does this happen by just typing |
it happens automatic when u type |
What terminal emulator and OS are you using? |
iTerm and osx El Capitan |
You can check your encoding in |
@frmendes my encoding is on unicode (UTF-8) |
I am experiencing the same issue as @IanCStewart :-/ |
Update, this only happens if I set |
@andreabedini @IanCStewart should be fixed by now. Sorry it took me so long. It's ok on my end but can you confirm it, please? I'll re-open the issue if it persists. |
To be honest, it was something pretty new to me as well. The relevant change is this line. When you are using some special characters, like Zsh checks the full width of the prompt in order to place each character in the correct column of a line. With some characters, especially unicode, there was a tendency to over-estimate the character width. If you Google around for However, if you try this in geometry, in the line I previously linked, you'll see that it starts ignoring the space after the prompt character, unless you are on a git repo. This ticked me off because it meant the width of the character assumed by zsh was definitely wrong. Instead, I had to explicitly tell zhs the width of the prompt character, by wrapping it in I wouldn't have noticed it only happened with specific prompt characters without your comment, thanks for that one! As for your comment, feel free to open a PR! I'm not sure I want to bind geometry, to any particular language, which means I'd eventually put something for rbenv/rvm and nvm as well. I'm on the fence on how fast the version check is as well. geometry is starting to get a bit slow, especially in large repos. Maybe something as discussed in #6 would come in handy for this. If you do open the PR, I'd like to discuss some options. |
@frmendes looks like its working just doing some weird indenting jumping stuff now. ass u can see below first it has more space then the space disappears |
That really shouldn't happen after the fix. Can you check if it happens with |
just FYI I switched to ☁︎ and ☂ for |
I just pushed a fix for this. There's a small caveat with it, though. Using unicode characters means I have to calculate the size of the prompt character. In some cases, such as ☁︎, zsh has some issues figuring out the prompt character columns and a space gets added after the prompt. However, this only happens with some characters, as far as I could tell, which means I don't have a fix for it. It should be solved on a case-by-case basis, changing the If someone finds a fix for that, I'd really appreciate. |
@fribmendes This seems to have reappeared after updating to macOS High Sierra v10.13.1 using iTerm2 v3.1.5. It works perfectly fine in Terminal. It was also working fine before updating the OS. The particular character that I have found that doesn't work is ⚡ (U+26A1). |
I'm having the same issue, removing the |
@goliatone @lox is any of you running High Sierra? |
Yup, sure am! |
Yes |
So with inconsolata for powerline, that symbol seems to be 'double wide' I know almost nothing about unicode and font rendering, but thought I would share in case it would help someone who knows more. |
Hi, not sure if it's the exact same issue, but mine is doing some weird stuff too High Sierra, iTerm 3.1.5, Roboto Mono as font I also tried to do this
And it does the same thing |
Hi, |
Some news about this. The explanation is available in this comment and you can trace this back to f0973e9 which fixes it. I didn't have this issue in Sierra, was finally able to upgrade to High Sierra and I am only able to reproduce it when I copy @steinybot 's character. Not when I hit cmd + ctrl + space and selected the thunder. So I did the following in Ruby: [1] pry(main)> steinybot_thunder = "⚡"
=> "⚡"
[2] pry(main)> apple_thunder = "⚡️"
=> "⚡️"
[3] pry(main)> steinybot_thunder == apple_thunder
=> false
[4] pry(main)> steinybot_thunder.codepoints
=> [9889]
[5] pry(main)> apple_thunder.codepoints
=> [9889, 65039] I do believe nothing has changed in the meantime, it's about the different characters and their respective byte size. zsh has some issues calculating the byte size. The problem is that with @steinybot 's thunder emoji, there's only 1 byte in the string but probably it requires more than that in the screen? I'm not 100% sure on how UTF-8 works in this sense. I'm not sure there is a fix required in this sense. @primalmotion can you see if yours is related to #214 ? EDIT: Apparently the thunders are not being displayed correctly in a code block. This is steinbot's thunder: ⚡. This is apple's: ⚡️. They look the same in the terminal but the byte size is different. |
@n-a-t-h-i-a-s bold is a bit more difficult. If I do |
@n-a-t-h-i-a-s I added some proposals to support that in #216 |
Another update on apple emojis: 🌊 and 🤙 have one single codepoint, which means they share the same issue as the thunder I mentioned previously. I'm not sure how to handle this. |
fixed in v2 i think |
Here's a blast from the past. This is currently happening to me by swapping the order of the plugins:
With the above config, if I do |
Seems to be
|
hmm i forget the history of why we needed |
#100 related I wonder if |
|
So, Although I'm curious as to why |
Fixed by #298 |
I am having a problem using this theme when I try to tab complete
so it's like
▲ .oh-my-zsh/custom/themes ls
and after tab completion it becomes
▲ .oh-my-zsh/custom/themesls
I tried to modify the theme but failed. Really can't figure out where the problem is
The text was updated successfully, but these errors were encountered: