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
Unicode symbols have a default emoji presentation style, such as either text presentation or emoji presentation
In text presentation, those "symbols" usually take up one grid cell, so wcwidth == 1 (narrow characters), but for emoji presentation, such symbols usually take up 2 grid cells (wide characters, in terms of east-asian width properties)
So emojis in emoji presentation style should be rendered inside two cells, and the cursor should be expected not on the next, but on the next after that column.
U+009C has default presentation style Text, but U+009C U+FE0F enforces this emoji to be displayed in emoji presentation mode, hence 2 cells.
So I think all emoji presentation modifiers in (neo)vim are ignored.
On the other side, an emoji with default presentation style "emoji" can be forced to be displayed in text presentation mode using the modifier U+FE0E, such as
U+1F600 - with default presentation style emoji, so double-width character
U+1F600 U+FE0E - forcing presentation style text, so single-width character.
nvim --version: latest master from 2 days ago
Operating system/version: Ubuntu 20.04
Terminal name/version: gnome-terminal and konsole from distribution version.
$TERM: xterm-256color
NB: with regards to terminal emulators, they mostly behave differently when it comes to complex unicode codepoints.
Steps to reproduce using nvim -u NORC
I used set colorcolumn=80 to see if that vertical bar is rendered correctly.
Open a file that in a few line contains latin text, and in another line some double-width emoji.
Actually it can also be seen if you use coc.nvim plugin that shows some emoji symbols for error and warning diagnostics on the left bar, then the colorcolumn will not look straight anymore.
Actual behaviour
vertical bar from colorcolumn is off by >=1 for any line that contains double-width symbols in emoji presentation.
Expected behaviour
to be straight everywhere
The text was updated successfully, but these errors were encountered:
Unicode symbols have a default emoji presentation style, such as either text presentation or emoji presentation
In text presentation, those "symbols" usually take up one grid cell, so
wcwidth == 1
(narrow characters), but for emoji presentation, such symbols usually take up 2 grid cells (wide characters, in terms of east-asian width properties)So emojis in emoji presentation style should be rendered inside two cells, and the cursor should be expected not on the next, but on the next after that column.
U+009C
has default presentation style Text, butU+009C U+FE0F
enforces this emoji to be displayed in emoji presentation mode, hence 2 cells.I also noticed that on other symbols, such as
So I think all emoji presentation modifiers in (neo)vim are ignored.
On the other side, an emoji with default presentation style "emoji" can be forced to be displayed in text presentation mode using the modifier U+FE0E, such as
nvim --version
: latest master from 2 days ago$TERM
:xterm-256color
NB: with regards to terminal emulators, they mostly behave differently when it comes to complex unicode codepoints.
Steps to reproduce using
nvim -u NORC
I used
set colorcolumn=80
to see if that vertical bar is rendered correctly.Open a file that in a few line contains latin text, and in another line some double-width emoji.
Actually it can also be seen if you use coc.nvim plugin that shows some emoji symbols for error and warning diagnostics on the left bar, then the
colorcolumn
will not look straight anymore.Actual behaviour
vertical bar from colorcolumn is off by >=1 for any line that contains double-width symbols in emoji presentation.
Expected behaviour
to be straight everywhere
The text was updated successfully, but these errors were encountered: