Skip to content
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

Tab completion preview thrown off track by unicode filenames #155

Closed
mikaeleiman opened this issue Jun 19, 2012 · 3 comments
Closed

Tab completion preview thrown off track by unicode filenames #155

mikaeleiman opened this issue Jun 19, 2012 · 3 comments
Milestone

Comments

@mikaeleiman
Copy link

Example:

mikaeleiman@Berit ~/temp> ls
C#.tmbundle          jlink-test           s3stats
dmtp                 libusb-0.1.12.tar.gz
dmtp_corp            namnlös mapp
mikaeleiman@Berit ~/temp> cd namnlös mapp/
mikaeleiman@Berit ~/temp> cd ammnlös mapp/

I have a dir with a name containing a multi-byte UTF8 character, "namnlös mapp". When I type "cd n", the rest of the name is auto-complete-previewed (yay!). However, instead of the insert point being on "a", as you would expect, it's been moved back to "n". So when I type the second letter of the name, it overwrites the first letter, resulting in the last line of the example.

@ridiculousfish
Copy link
Member

Reproduces for me on OS X

@ridiculousfish
Copy link
Member

wcwidth() does the wrong thing for combining characters. It's discussed at http://www.zsh.org/mla/workers/2008/msg00503.html

@ridiculousfish
Copy link
Member

The deeper problem is that fish has no way of representing that a zero-width character has been output, so the combining marks can get lost very easily.

I rewrote the line representation here to add support. That should fix this.

To git@github.com:fish-shell/fish-shell.git
b1281c3..ea1bfd7 master -> master

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants