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

Comments

Projects
None yet
2 participants
@mikaeleiman

mikaeleiman commented Jun 19, 2012

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

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Jul 14, 2012

Member

Reproduces for me on OS X

Member

ridiculousfish commented Jul 14, 2012

Reproduces for me on OS X

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Jul 14, 2012

Member

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

Member

ridiculousfish commented Jul 14, 2012

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

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Jul 15, 2012

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

Member

ridiculousfish commented Jul 15, 2012

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

@zanchey zanchey referenced this issue Nov 28, 2017

Closed

Disable HAVE_BROKEN_WCWIDTH #4554

0 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment