mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #756] [CLOSED] fix(utf8): correct Devanagari conjunct width from 2 to 1 #1540
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1540
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/756
Author: @simonklee
Created: 2/28/2026
Status: ❌ Closed
Base:
main← Head:fix-devanagari-ligatures📝 Commits (3)
cda25bcfix(utf8): correct Devanagari conjunct width from 2 to 14a64c27Merge branch 'main' into fix-devanagari-ligaturesa205a3cMerge branch 'main' into fix-devanagari-ligatures📊 Changes
5 files changed (+127 additions, -49 deletions)
View changed files
📝
packages/core/src/zig/tests/edit-buffer_test.zig(+7 -4)📝
packages/core/src/zig/tests/utf8_no_zwj_test.zig(+5 -5)📝
packages/core/src/zig/tests/utf8_test.zig(+102 -19)📝
packages/core/src/zig/text-buffer-iterators.zig(+5 -1)📝
packages/core/src/zig/utf8.zig(+8 -20)📄 Description
Devanagari conjuncts (e.g. क्त, ज्ञ) were reporting width 2 because Devanagari-specific code that added the second consonant's width after a virama. Terminals with font support render these as single-width ligatures.
The fix removes the Devanagari-specific width addition entirely. The existing "first base codepoint width wins" logic already does the right thing: the first consonant sets width=1, the virama contributes 0, and the second consonant (grouped into the same cluster by GB9c) is ignored because has_width is already true.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.