thlorenz / brace

📔 browserify compatible version of the ace editor.
http://thlorenz.github.io/brace/
MIT License
1.06k stars 304 forks source link

Bug Report: Cursor unable to cater to grapheme #124

Open daphne-jr opened 6 years ago

daphne-jr commented 6 years ago

Typing things like 'G̴̻͈͍͔̹̑͗̎̅͛́Ǫ̵̹̻̝̳͂̌̌͘' or '😄😄😄😄😄😄😄😄😄😄😄😄😄' or 'ล่ล่ล่ล่ล่ล่ล่ล่ล่ล่ล่ล่ล่ล่ล่ล่' will cause the cursor to go haywire.

screen shot 2018-04-24 at 1 48 24 pm
fairyly commented 4 years ago

Was using a web-font that wasn't Monospaced? Switching to a monosized font like this:

font-family: Consolas, Monaco, monospace;
daphne-jr commented 4 years ago

@fairyly: this might fix unicode that only takes up 1 space like '😄' but the cursor will miscalculate the spacing for G̴̻͈͍͔̹̑͗̎̅͛́ or ล่ because for example ล่ is made up of 2 characters ส+ ่ = ส่ .