Skip to content

feat(linux): add managed emoji font support - #201

Open
ipproyectosysoluciones wants to merge 2 commits into
Gentleman-Programming:mainfrom
ipproyectosysoluciones:feat/linux-emoji-unicode
Open

ipproyectosysoluciones wants to merge 2 commits into
Gentleman-Programming:mainfrom
ipproyectosysoluciones:feat/linux-emoji-unicode

Conversation

@ipproyectosysoluciones

Copy link
Copy Markdown

Implements #200 (status: needs-review / enhancement).

Adds managed emoji font support and Unicode rendering configuration to the Vim trainer simulator (simulator.go) for Linux multi-byte UTF-8 input.

Changes:

  • simulator.go: isWordChar byte→rune; add runeAtBytePos, isEmojiRune, findNextEmoji; update moveWord* for UTF-8
  • simulator_unicode_test.go (PASS)
  • installer/e2e/test_emoji_navigation.sh
  • AGENTS.md reference + contribution spec doc (English title per user request)
  • Fix obsidian.nvim config (completion.blink deprecated; picker.name → snacks.picker; workspace clean)

Build: go clean. Tests: PASS.
Label intended: type:feature (not present in upstream repo; suggest adding).

bladimir and others added 2 commits September 6, 2026 06:00
- simulator.go: switch isWordChar from byte to rune for UTF-8/emoji
- add runeAtBytePos, isEmojiRune, findNextEmoji helpers
- update moveWordForward/Backward/EndOfWord for rune boundaries
- add simulator_unicode_test.go (ASCII + emoji navigation PASS)
- add e2e/test_emoji_navigation.sh
- AGENTS.md: link contribution doc

Refs: Linux: add managed emoji font support and Unicode rendering configuration
Address the fleet review findings on the emoji/Unicode PR:

- moveEndOfWord advanced while the current rune was a word char, so it
  stopped on the first non-word rune (one past the word), and the
  trailing adjust block had its condition inverted, never correcting
  the overshoot. Advance while the next rune is a word char instead and
  drop the broken adjust block; add regression tests for the review
  case (hello world), the second-word hop, end-of-line words, and the
  emoji word case.
- isWordCharForTextObj built a string from a single byte value, which
  re-encoded the byte as a code point instead of decoding the original
  UTF-8 stream, making its multi-byte handling a no-op. Pass the source
  line plus byte offset so text objects classify real runes.
- The emoji navigation E2E script hardcoded an absolute path from the
  author's machine and printed PASS unconditionally (it even reported
  a helper that never existed). Use a repo-relative path, assert the
  helpers that the feature actually ships, and exit non-zero on
  failure.
@ipproyectosysoluciones

Copy link
Copy Markdown
Author

Both findings from the deepseek review are fixed in 90a0b9a:

  • moveEndOfWord overshoot (blocking): the loop now advances while the next rune is a word char, so it stops on the last word rune instead of one past it; the trailing adjust block (whose condition was inverted) is gone. The review case (hello world from col 0 → col 4) plus the second-word hop, end-of-line words, and the emoji word case are pinned in new regression tests, and the pre-existing TestSimulateMotions_EndOfWord is green again (it was red on the previous head).
  • E2E script: now uses a repo-relative path, asserts the helpers the feature actually ships, and exits non-zero on failure. The unconditional PASS was hiding that findNextEmoji never existed — the script was reporting "available: 0" for it.
  • isWordCharForTextObj: now takes the source line plus byte offset and decodes the real rune, so text objects classify multi-byte letters and emoji by their actual code points.

go test ./internal/tui/trainer/ and go build ./... pass locally.

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