MovingtoMars / liner

A readline-like library in Rust.
MIT License
74 stars 24 forks source link

This ⸻ unicode ⸻ character ⸻ makes ⸻ weird ⸻ things ⸻ happen #49

Open z3ntu opened 7 years ago

z3ntu commented 7 years ago

https://github.com/redox-os/ion/issues/293

MovingtoMars commented 7 years ago

I'm investigating this.

My first step was to add a special case for this character when getting string widths.

That hasn't seemed to have solved the problem though, and in fact my terminal emulator itself (Konsole) is acting wonky trying to display this!

It seems that Konsole itself thinks the width of this character is only 1 column, which is why when you paste in this character the cursor moves to the right one column. The terminal is supposed to move the cursor to the end of the text after text is written to it. Since it doesn't, this throws off liner's cursor movement algorithm.