Skip to content

Commit 18c7984

Browse files
committed
trying new fix for windows
1 parent 2456ae1 commit 18c7984

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎PLAN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Implementation is past the local-shell phase and currently sits at a DB-first, l
2727
- Chat title quality tracking with source precedence, group/contact metadata refresh, and safe placeholders so group JIDs/phone-like IDs are not treated as real names.
2828
- Direct-chat identity hardening for WhatsApp PN/LID aliases: canonicalize mapped 1:1 chats onto a single chat ID, merge already-split alias rows/messages/drafts/history cursors in SQLite, and preserve the active conversation when a live merge remaps the selected chat.
2929
- Large-history TUI guardrails: historical imports avoid refresh storms, reconnect catch-up sync shows a blocking progress overlay and batches snapshot refreshes until completion, live refreshes are debounced, stale snapshot reloads do not steal chat focus, message rendering is bounded to the visible window, message cursor scrolling behaves like the chat list viewport, duplicate in-flight history requests are suppressed, and `ueberzug++` media/avatar/sticker overlays pause into blank reserved space while scrolling before resyncing.
30-
- Terminal/UI polish for real chat data: full/compat/auto emoji rendering, stable emoji fallback for terminals such as `st` and classic Windows console hosts, pywal-backed mode indicators with per-mode hex overrides, focused-pane borders that distinguish chat-list vs message-pane input focus, highlighted unread-count badges in the chat list, a structured keymap-driven help screen, non-redundant mode prompts, configurable help/prompt key hints, search match counts in the status bar, configurable cancellation/search-clear bindings, platform-specific terminal focus-reporting options, and native Windows runtime defaults that do not affect Linux behavior.
30+
- Terminal/UI polish for real chat data: full/compat/auto emoji rendering, stable emoji fallback for terminals such as `st`, Windows Terminal, and classic Windows console hosts, pywal-backed mode indicators with per-mode hex overrides, focused-pane borders that distinguish chat-list vs message-pane input focus, highlighted unread-count badges in the chat list, a structured keymap-driven help screen, non-redundant mode prompts, configurable help/prompt key hints, search match counts in the status bar, configurable cancellation/search-clear bindings, platform-specific terminal focus-reporting options, and native Windows runtime defaults that do not affect Linux behavior.
3131
- Demo/dev workflows that exercise the full local UI without a live WhatsApp session.
3232

3333
### In progress

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Remote media starts as metadata in SQLite. Opening, previewing, saving, or runni
217217

218218
## Emoji and theming
219219

220-
Emoji rendering defaults to `emoji_mode = "auto"` in `config.toml`. Auto mode preserves full emoji sequences on most UTF-8 terminals, but uses the stable compatibility path for terminals such as `st` and classic Windows console hosts that can display emoji glyphs while still misreporting complex emoji cell widths. Set `emoji_mode = "compat"` to force stable degraded rendering, or `emoji_mode = "full"` to force skin tones, ZWJ professions/families, and flags.
220+
Emoji rendering defaults to `emoji_mode = "auto"` in `config.toml`. Auto mode preserves full emoji sequences on most UTF-8 terminals, but uses the stable compatibility path for terminals such as `st` and Windows Terminal/classic Windows console hosts that can display emoji glyphs while still misreporting complex emoji cell widths. Set `emoji_mode = "compat"` to force stable degraded rendering, or `emoji_mode = "full"` to force skin tones, ZWJ professions/families, and flags.
221221

222222
On Windows, run `vimwhat doctor` if the TUI looks wrong. It reports the terminal environment variables used for media, emoji, and focus-reporting decisions. Older console hosts may not support all optional terminal features; Windows focus reporting is enabled only for known modern hosts or with `VIMWHAT_FORCE_REPORT_FOCUS=1`.
223223

‎internal/config/emoji_windows.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ func platformPrefersCompatEmoji(term string) bool {
1616
if strings.Contains(program, "wezterm") {
1717
return false
1818
}
19-
return strings.TrimSpace(os.Getenv("WT_SESSION")) == ""
19+
return true
2020
}

‎internal/config/emoji_windows_test.go‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,19 @@ func TestWindowsEmojiAutoUsesCompatInClassicConsole(t *testing.T) {
1313
}
1414
}
1515

16-
func TestWindowsEmojiAutoAllowsFullInWindowsTerminal(t *testing.T) {
16+
func TestWindowsEmojiAutoUsesCompatInWindowsTerminal(t *testing.T) {
1717
t.Setenv("TERM_PROGRAM", "")
1818
t.Setenv("WT_SESSION", "session")
1919

20+
if got := ResolveEmojiModeForEnv(EmojiModeAuto, "xterm-256color", "", "", "en_US.UTF-8"); got != EmojiModeCompat {
21+
t.Fatalf("ResolveEmojiModeForEnv() = %q, want %q", got, EmojiModeCompat)
22+
}
23+
}
24+
25+
func TestWindowsEmojiAutoAllowsFullInWezTerm(t *testing.T) {
26+
t.Setenv("TERM_PROGRAM", "WezTerm")
27+
t.Setenv("WT_SESSION", "")
28+
2029
if got := ResolveEmojiModeForEnv(EmojiModeAuto, "xterm-256color", "", "", "en_US.UTF-8"); got != EmojiModeFull {
2130
t.Fatalf("ResolveEmojiModeForEnv() = %q, want %q", got, EmojiModeFull)
2231
}

0 commit comments

Comments
 (0)