Vim 9.2: Incorrect rendering and display width of multi-codepoint emoji sequences (e.g., keycap emojis)

Ouverte
#21,935 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 13 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
48/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
c, vim
Domaine
frontend

Piste de recherche

Start by reproducing the issue in Vim 9.2 with the attached TODO.md and emojis.txt files in the reported iTerm2 environment, then compare Vim's output with cat. Trace the display-width calculation for multi-codepoint emoji sequences, including keycaps, variation selectors, and zero-width joiners; the issue does not identify a source file or test. Done means these sequences render with correct widths and no missing, overlapping, or shifted characters.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug
Steps to reproduce
  1. Download the two attached files: TODO.md and emojis.txt.
  2. Open each file in Vim
  3. Compare the rendering with cat in the same terminal
  4. Compare the results with TextMate or Atom

Observed issues:

TODO.md (line 2): Vim displays the keycap emoji sequence only up to 6️⃣. The remaining emojis (7️⃣ 8️⃣ 9️⃣ 🔟) are not visible, while cat displays the complete sequence.

emojis.txt (line 7): Several keycap emojis are incorrectly positioned or missing.

emojis.txt (lines 3–6): Some adjacent emojis are incorrectly spaced, compressed, or visually misaligned.

The issue appears to affect the calculation of display widths for multi-codepoint emoji sequences. The files themselves are valid UTF-8 and display correctly in other applications.

Screenshots comparing Vim, cat, TextMate, and Atom are provided.

Expected behaviour

Vim should display all Unicode emojis correctly, including multi-codepoint emoji sequences (such as keycap emojis 0️⃣–9️⃣, variation selectors, and zero-width joiner sequences).

All emojis should occupy the correct display width without overlapping, disappearing, or shifting subsequent characters.

The rendering should be consistent with cat in the same terminal and with graphical text editors such as TextMate and Atom.

Version of Vim

VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Nov 12 2026 20:17:39)

Environment

Operating system: macOS (Apple Silicon, ARM64)

Terminal emulator: iTerm2

TERM: xterm

TERM_PROGRAM: iTerm.app

Encoding: UTF-8

Other applications tested: cat, TextMate, Atom

Logs and stack traces

Langage dominant
Vim Script
Étoiles
41.4k
Forks
6.2k
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de vim/vim

Toutes les issues de vim/vim

Issues similaires

Plus d'issues Web Dev

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.