patches: fix if(candidate) block indentation in 0008 (I1)

The if(candidate) block in postAccessibilityNotificationsForFrame:
had its opening brace at col 8 (tab) while the if itself is at
col 10 (tab+2), violating GNU coding style.  Two consecutive
closing braces at col 8 made nesting ambiguous on inspection.

Correct indentation (all +4 columns throughout the block):
  - if(candidate) brace: tab+4 = col 12
  - Body (/* Deduplicate */, if(![...]): tab+6 = col 14
  - Inner if(![...]) brace: 2 tabs = col 16
  - Inner if body: tab+tab+2 = col 18
  - Inner closing brace: 2 tabs = col 16
  - if(candidate) closing brace: tab+4 = col 12

New indentation exactly matches the original deleted code (same
method, before our refactor), confirming it follows the pre-existing
style in this file.
This commit is contained in:
2026-03-04 13:53:05 +01:00
parent 6dd3c9bfe4
commit fe0a0181d3

View File

@@ -496,7 +496,7 @@ index c9fe93a57b..f7574efb39 100644
+ if (![candidate isEqualToString:
+ self.cachedCompletionAnnouncement])
- {
+ {
+ {
- /* Deduplicate: only announce when the candidate changed. */
- if (![candidate isEqualToString:
- self.cachedCompletionAnnouncement])
@@ -519,25 +519,25 @@ index c9fe93a57b..f7574efb39 100644
- NSAccessibilityAnnouncementRequestedNotification,
- annInfo);
- }
+ self.cachedCompletionAnnouncement = candidate;
+ self.cachedCompletionAnnouncement = candidate;
+
+ /* Announce the candidate text directly via NSApp.
+ Do NOT post SelectedTextChanged --- that would cause
+ VoiceOver to read the AX text at the cursor position
+ (the minibuffer input line), not the overlay candidate.
+ AnnouncementRequested with High priority interrupts
+ any current speech and announces our text. */
+ NSDictionary *annInfo = @{
+ NSAccessibilityAnnouncementKey: candidate,
+ NSAccessibilityPriorityKey:
+ @(NSAccessibilityPriorityHigh)
+ };
+ ns_ax_post_notification_with_info (
+ NSApp,
+ NSAccessibilityAnnouncementRequestedNotification,
+ annInfo);
+ /* Announce the candidate text directly via NSApp.
+ Do NOT post SelectedTextChanged --- that would cause
+ VoiceOver to read the AX text at the cursor position
+ (the minibuffer input line), not the overlay candidate.
+ AnnouncementRequested with High priority interrupts
+ any current speech and announces our text. */
+ NSDictionary *annInfo = @{
+ NSAccessibilityAnnouncementKey: candidate,
+ NSAccessibilityPriorityKey:
+ @(NSAccessibilityPriorityHigh)
+ };
+ ns_ax_post_notification_with_info (
+ NSApp,
+ NSAccessibilityAnnouncementRequestedNotification,
+ annInfo);
- }
+ }
+ }
- }
+ }
+ }