You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Double-width UTF-encoded symbols (e.g., emojis, full-width East Asian chars, etc.) don't render properly, as all characters are expected to have a width of 1. To see this, change rx += 1 to rx += 2 in cx_to_rx, and cur_rx += 1 to cur_rx += 2 in rx_to_cx. The cursor will position correctly when adding an emoji, for instance, but will break for single-width Unicode chars.
Sounds like we need to use wcwidth and wcswidth to get the actual width of these when rendering.
The text was updated successfully, but these errors were encountered:
Double-width UTF-encoded symbols (e.g., emojis, full-width East Asian chars, etc.) don't render properly, as all characters are expected to have a width of 1. To see this, change
rx += 1
torx += 2
incx_to_rx
, andcur_rx += 1
tocur_rx += 2
inrx_to_cx
. The cursor will position correctly when adding an emoji, for instance, but will break for single-width Unicode chars.Sounds like we need to use
wcwidth
andwcswidth
to get the actual width of these when rendering.The text was updated successfully, but these errors were encountered: