Skip to content

fix(engine): add missing điu pattern to _consonantD table#323

Closed
mantrandev wants to merge 1 commit into
tuyenvm:masterfrom
mantrandev:fix/vni-diu-consonant-d
Closed

fix(engine): add missing điu pattern to _consonantD table#323
mantrandev wants to merge 1 commit into
tuyenvm:masterfrom
mantrandev:fix/vni-diu-consonant-d

Conversation

@mantrandev
Copy link
Copy Markdown

Summary

  • {KEY_D, KEY_I, KEY_U} was missing from _consonantD in Vietnamese.cpp
  • In VNI mode, typing diu91 produced literal diu91 instead of đíu
  • Only the reversed order d9iu1 worked because the buffer held just [d] when 9 arrived, matching the existing {KEY_D} entry

Root cause

When 9 (the VNI đ-key, IS_KEY_D) is pressed after diu, the engine scans _consonantD for a matching syllable pattern. {KEY_D, KEY_I, KEY_U} did not exist, so the engine fell through and inserted 9 as a literal character. After that, 1 (sắc) found a non-vowel-ending buffer and also fell through as a literal.

Test plan

  • Type diu91 in VNI mode → should produce đíu
  • Type d9iu1 in VNI mode → should still produce đíu
  • Type diu + other tone marks (diu92, diu93, etc.) → verify tones apply correctly

@mantrandev mantrandev force-pushed the fix/vni-diu-consonant-d branch from 7b5b79d to ba6212d Compare May 11, 2026 16:22
@mantrandev mantrandev closed this by deleting the head repository May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant