From 9f5e5b6e832aa9c036a0e0b4fb68bb8906700525 Mon Sep 17 00:00:00 2001 From: Daneel Date: Mon, 2 Mar 2026 10:17:53 +0100 Subject: [PATCH] Revert patch 0003 granularity change -- patch 0008 already has this fix Patch 0008 modifies postFocusedCursorNotification to add '&& direction != discontiguous' to the isCharMove guard, which IS the cursor sync fix. Changing patch 0003 independently broke patch 0008's context match. Restore patch 0003 to original. --- ...-notification-dispatch-and-mode-line-el.patch | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/patches/0003-ns-add-buffer-notification-dispatch-and-mode-line-el.patch b/patches/0003-ns-add-buffer-notification-dispatch-and-mode-line-el.patch index 3e2cb45..c6ee38a 100644 --- a/patches/0003-ns-add-buffer-notification-dispatch-and-mode-line-el.patch +++ b/patches/0003-ns-add-buffer-notification-dispatch-and-mode-line-el.patch @@ -29,7 +29,7 @@ diff --git a/src/nsterm.m b/src/nsterm.m index 3e1ac74..d3015e2 100644 --- a/src/nsterm.m +++ b/src/nsterm.m -@@ -8758,6 +8758,554 @@ - (NSRect)accessibilityFrame +@@ -8758,6 +8758,552 @@ - (NSRect)accessibilityFrame @end @@ -107,14 +107,12 @@ index 3e1ac74..d3015e2 100644 + = @(ns_ax_text_state_change_selection_move); + moveInfo[@"AXTextSelectionDirection"] = @(direction); + moveInfo[@"AXTextChangeElement"] = self; -+ /* Always include granularity so VoiceOver can advance its browse -+ cursor by the correct unit (character, word, or line). Without -+ granularity, VO leaves its browse cursor at the previous position -+ for character moves, breaking Emacs-cursor -> VO-cursor sync. -+ For character moves, the explicit AnnouncementRequested below -+ (High priority) overrides VO's auto-speech, so evil block-cursor -+ mode still reads the correct character. */ -+ moveInfo[@"AXTextSelectionGranularity"] = @(granularity); ++ /* Omit granularity for character moves so VoiceOver does not ++ derive its own speech (it would read the wrong character ++ for evil block-cursor mode). Include it for word/line/ ++ selection so VoiceOver reads the appropriate text. */ ++ if (!isCharMove) ++ moveInfo[@"AXTextSelectionGranularity"] = @(granularity); + + ns_ax_post_notification_with_info ( + self,