terminal: combining characters are dropped on the screen and in the scrollback
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- desktop-dev, frontend
Research direction
Start with terminal_get_row and terminal_sb_line_extract in extensions/terminal/terminal.c, then follow the screen-cell path into render-row-direct. Reproduce the missing combining marks with the provided printf and seq commands, and check the result both on screen and after scrolling into history. The fix is complete when every non-zero entry in chars[] is encoded and the displayed and scrollback text preserve the combining marks; run the project’s verify checks.
Written by the indexing model from the issue text.
Description
M-x terminal drops combining characters, both on the screen and in the scrollback.
terminal_get_row and terminal_sb_line_extract (extensions/terminal/terminal.c) read only chars[0] of each VTermScreenCell and ignore chars[1..], where libvterm keeps the combining marks of the cell.
To reproduce: in M-x terminal, run printf 'e\xcc\x81\n'; seq 1 60 (e and U+0301 COMBINING ACUTE ACCENT). The line shows e instead of é, on the screen and after it scrolled into the history. Text written with combining marks (Thai, Indic scripts, decomposed Korean) loses them.
Fix: encode every entry of chars[] up to the first 0, in both functions. On the screen side, cell-data holds one uint32_t per cell, so render-row-direct would need the extra code points too (or the C side could compose them into the string it gives).
Found by the review of #2522 (a pre-existing issue, not changed there).
An agent can fix this and check it with verify.
- Dominant language
- Common Lisp
- Stars
- 3.1k
- Forks
- 261
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 133
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lem-project/lem
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
lem-project/lem#2525 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
lem-project/lem#2524 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
lem-project/lem#2488 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
lem-project/lem#2369 ·
Maintainers usually reply within 1 day
-
unix-paste-bugOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lem-project/lem#2360 ·
Maintainers usually reply within 1 day
Similar issues
-
in-progress
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
s1dashu/quiet-md#572 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
flathub/org.ardour.Ardour#89 ·