|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
From 2de5c652dbcc355549941cc9940bac9f31ab3ea6 Mon Sep 17 00:00:00 2001
|
|
|
|
From 13da736610fc631a9ea420d6918eefd2791940d3 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Daneel <daneel@sukany.cz>
|
|
|
|
From: Daneel <daneel@sukany.cz>
|
|
|
|
Date: Mon, 2 Mar 2026 18:49:13 +0100
|
|
|
|
Date: Mon, 2 Mar 2026 18:49:13 +0100
|
|
|
|
Subject: [PATCH 8/8] ns: announce child frame completion candidates for
|
|
|
|
Subject: [PATCH 8/8] ns: announce child frame completion candidates for
|
|
|
|
@@ -33,8 +33,8 @@ area announcements.
|
|
|
|
doc/emacs/macos.texi | 14 +-
|
|
|
|
doc/emacs/macos.texi | 14 +-
|
|
|
|
etc/NEWS | 18 +-
|
|
|
|
etc/NEWS | 18 +-
|
|
|
|
src/nsterm.h | 20 ++
|
|
|
|
src/nsterm.h | 20 ++
|
|
|
|
src/nsterm.m | 515 ++++++++++++++++++++++++++++++++++++++++---
|
|
|
|
src/nsterm.m | 508 ++++++++++++++++++++++++++++++++++++++++---
|
|
|
|
4 files changed, 519 insertions(+), 48 deletions(-)
|
|
|
|
4 files changed, 512 insertions(+), 48 deletions(-)
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
|
|
|
|
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
|
|
|
|
index 8d4a7825d8..03a657f970 100644
|
|
|
|
index 8d4a7825d8..03a657f970 100644
|
|
|
|
@@ -149,7 +149,7 @@ index 21a93bc799..bdd40b8eb7 100644
|
|
|
|
@end
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/nsterm.m b/src/nsterm.m
|
|
|
|
diff --git a/src/nsterm.m b/src/nsterm.m
|
|
|
|
index 523f79d235..a885249f30 100644
|
|
|
|
index 523f79d235..45f83f3ac6 100644
|
|
|
|
--- a/src/nsterm.m
|
|
|
|
--- a/src/nsterm.m
|
|
|
|
+++ b/src/nsterm.m
|
|
|
|
+++ b/src/nsterm.m
|
|
|
|
@@ -1126,24 +1126,19 @@ Uses CFAbsoluteTimeGetCurrent() (~5 ns, a VDSO read) for timing. */
|
|
|
|
@@ -1126,24 +1126,19 @@ Uses CFAbsoluteTimeGetCurrent() (~5 ns, a VDSO read) for timing. */
|
|
|
|
@@ -187,20 +187,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Scan overlay before-string / after-string properties in the
|
|
|
|
/* Scan overlay before-string / after-string properties in the
|
|
|
|
@@ -1464,6 +1459,12 @@ so the visual offset is (ov_line + 1) * line_h from
|
|
|
|
@@ -7407,6 +7402,112 @@ visual line index for Zoom (skip whitespace-only lines
|
|
|
|
#endif
|
|
|
|
|
|
|
|
gsaved = YES;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+ /* Unbind record_unwind_current_buffer for both overlay and child
|
|
|
|
|
|
|
|
+ frame paths. The overlay path calls unbind_to before return;
|
|
|
|
|
|
|
|
+ this call covers the child frame path and the no-candidate path.
|
|
|
|
|
|
|
|
+ unbind_to is idempotent if count equals the current specpdl
|
|
|
|
|
|
|
|
+ index (i.e. already unbound by the overlay path). */
|
|
|
|
|
|
|
|
+ unbind_to (count, Qnil);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -7407,6 +7408,112 @@ visual line index for Zoom (skip whitespace-only lines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return nil;
|
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -313,7 +300,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
/* Build accessibility text for window W, skipping invisible text.
|
|
|
|
/* Build accessibility text for window W, skipping invisible text.
|
|
|
|
Populates *OUT_START with the buffer start charpos.
|
|
|
|
Populates *OUT_START with the buffer start charpos.
|
|
|
|
Populates *OUT_RUNS with an array of visible runs and *OUT_NRUNS
|
|
|
|
Populates *OUT_RUNS with an array of visible runs and *OUT_NRUNS
|
|
|
|
@@ -8149,15 +8256,23 @@ - (void)ensureTextCache
|
|
|
|
@@ -8149,15 +8250,23 @@ - (void)ensureTextCache
|
|
|
|
if (!b)
|
|
|
|
if (!b)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -343,7 +330,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
if (cachedText && cachedTextModiff == chars_modiff
|
|
|
|
if (cachedText && cachedTextModiff == chars_modiff
|
|
|
|
&& cachedTextStart == BUF_BEGV (b)
|
|
|
|
&& cachedTextStart == BUF_BEGV (b)
|
|
|
|
&& pt >= cachedTextStart
|
|
|
|
&& pt >= cachedTextStart
|
|
|
|
@@ -8587,6 +8702,11 @@ - (void)setAccessibilitySelectedTextRange:(NSRange)range
|
|
|
|
@@ -8587,6 +8696,11 @@ - (void)setAccessibilitySelectedTextRange:(NSRange)range
|
|
|
|
|
|
|
|
|
|
|
|
[self ensureTextCache];
|
|
|
|
[self ensureTextCache];
|
|
|
|
|
|
|
|
|
|
|
|
@@ -355,7 +342,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
specpdl_ref count = SPECPDL_INDEX ();
|
|
|
|
specpdl_ref count = SPECPDL_INDEX ();
|
|
|
|
record_unwind_current_buffer ();
|
|
|
|
record_unwind_current_buffer ();
|
|
|
|
/* Ensure block_input is always matched by unblock_input even if
|
|
|
|
/* Ensure block_input is always matched by unblock_input even if
|
|
|
|
@@ -9042,15 +9162,23 @@ - (void)postFocusedCursorNotification:(ptrdiff_t)point
|
|
|
|
@@ -9042,15 +9156,23 @@ - (void)postFocusedCursorNotification:(ptrdiff_t)point
|
|
|
|
= @(ns_ax_text_state_change_selection_move);
|
|
|
|
= @(ns_ax_text_state_change_selection_move);
|
|
|
|
moveInfo[@"AXTextSelectionDirection"] = @(direction);
|
|
|
|
moveInfo[@"AXTextSelectionDirection"] = @(direction);
|
|
|
|
moveInfo[@"AXTextChangeElement"] = self;
|
|
|
|
moveInfo[@"AXTextChangeElement"] = self;
|
|
|
|
@@ -385,7 +372,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
NSAccessibilitySelectedTextChangedNotification,
|
|
|
|
NSAccessibilitySelectedTextChangedNotification,
|
|
|
|
moveInfo);
|
|
|
|
moveInfo);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -9148,12 +9276,17 @@ user expectation ("w" jumps to next word and reads it). */
|
|
|
|
@@ -9148,12 +9270,17 @@ user expectation ("w" jumps to next word and reads it). */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -408,7 +395,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
if (cachedText
|
|
|
|
if (cachedText
|
|
|
|
&& granularity == ns_ax_text_selection_granularity_line)
|
|
|
|
&& granularity == ns_ax_text_selection_granularity_line)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -9218,6 +9351,11 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
|
|
|
|
@@ -9218,6 +9345,11 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
|
|
|
|
|
|
|
|
|
|
|
|
block_input ();
|
|
|
|
block_input ();
|
|
|
|
specpdl_ref count2 = SPECPDL_INDEX ();
|
|
|
|
specpdl_ref count2 = SPECPDL_INDEX ();
|
|
|
|
@@ -420,7 +407,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
record_unwind_protect_void (unblock_input);
|
|
|
|
record_unwind_protect_void (unblock_input);
|
|
|
|
record_unwind_current_buffer ();
|
|
|
|
record_unwind_current_buffer ();
|
|
|
|
if (b != current_buffer)
|
|
|
|
if (b != current_buffer)
|
|
|
|
@@ -9394,12 +9532,29 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
|
|
|
|
@@ -9394,12 +9526,29 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
|
|
|
|
if (!b)
|
|
|
|
if (!b)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -450,7 +437,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
if (modiff != self.cachedModiff)
|
|
|
|
if (modiff != self.cachedModiff)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
self.cachedModiff = modiff;
|
|
|
|
self.cachedModiff = modiff;
|
|
|
|
@@ -9413,6 +9568,7 @@ Text property changes (e.g. face updates from
|
|
|
|
@@ -9413,6 +9562,7 @@ Text property changes (e.g. face updates from
|
|
|
|
{
|
|
|
|
{
|
|
|
|
self.cachedCharsModiff = chars_modiff;
|
|
|
|
self.cachedCharsModiff = chars_modiff;
|
|
|
|
[self postTextChangedNotification:point];
|
|
|
|
[self postTextChangedNotification:point];
|
|
|
|
@@ -458,7 +445,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -9435,8 +9591,15 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
|
|
|
@@ -9435,8 +9585,15 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
|
|
|
displayed in the minibuffer. In normal editing buffers,
|
|
|
|
displayed in the minibuffer. In normal editing buffers,
|
|
|
|
font-lock and other modes change BUF_OVERLAY_MODIFF on
|
|
|
|
font-lock and other modes change BUF_OVERLAY_MODIFF on
|
|
|
|
every redisplay, triggering O(overlays) work per keystroke.
|
|
|
|
every redisplay, triggering O(overlays) work per keystroke.
|
|
|
|
@@ -476,7 +463,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
goto skip_overlay_scan;
|
|
|
|
goto skip_overlay_scan;
|
|
|
|
|
|
|
|
|
|
|
|
int selected_line = -1;
|
|
|
|
int selected_line = -1;
|
|
|
|
@@ -9482,7 +9645,18 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
|
|
|
@@ -9482,7 +9639,18 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
|
|
|
self.cachedPoint = point;
|
|
|
|
self.cachedPoint = point;
|
|
|
|
self.cachedMarkActive = markActive;
|
|
|
|
self.cachedMarkActive = markActive;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -496,7 +483,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
NSInteger direction = ns_ax_text_selection_direction_discontiguous;
|
|
|
|
NSInteger direction = ns_ax_text_selection_direction_discontiguous;
|
|
|
|
if (point > oldPoint)
|
|
|
|
if (point > oldPoint)
|
|
|
|
direction = ns_ax_text_selection_direction_next;
|
|
|
|
direction = ns_ax_text_selection_direction_next;
|
|
|
|
@@ -9530,6 +9704,58 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
|
|
|
@@ -9530,6 +9698,58 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
|
|
|
granularity = ns_ax_text_selection_granularity_line;
|
|
|
|
granularity = ns_ax_text_selection_granularity_line;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -555,7 +542,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
/* Post notifications for focused and non-focused elements. */
|
|
|
|
/* Post notifications for focused and non-focused elements. */
|
|
|
|
if ([self isAccessibilityFocused])
|
|
|
|
if ([self isAccessibilityFocused])
|
|
|
|
[self postFocusedCursorNotification:point
|
|
|
|
[self postFocusedCursorNotification:point
|
|
|
|
@@ -9672,6 +9898,13 @@ - (NSRect)accessibilityFrame
|
|
|
|
@@ -9672,6 +9892,13 @@ - (NSRect)accessibilityFrame
|
|
|
|
if (vis_start >= vis_end)
|
|
|
|
if (vis_start >= vis_end)
|
|
|
|
return @[];
|
|
|
|
return @[];
|
|
|
|
|
|
|
|
|
|
|
|
@@ -569,7 +556,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
block_input ();
|
|
|
|
block_input ();
|
|
|
|
specpdl_ref blk_count = SPECPDL_INDEX ();
|
|
|
|
specpdl_ref blk_count = SPECPDL_INDEX ();
|
|
|
|
record_unwind_protect_void (unblock_input);
|
|
|
|
record_unwind_protect_void (unblock_input);
|
|
|
|
@@ -9796,6 +10029,7 @@ than O(chars). Fall back to pos+1 as safety net. */
|
|
|
|
@@ -9796,6 +10023,7 @@ than O(chars). Fall back to pos+1 as safety net. */
|
|
|
|
pos = span_end;
|
|
|
|
pos = span_end;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -577,7 +564,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
return [[spans copy] autorelease];
|
|
|
|
return [[spans copy] autorelease];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -9977,6 +10211,10 @@ - (void)dealloc
|
|
|
|
@@ -9977,6 +10205,10 @@ - (void)dealloc
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
[accessibilityElements release];
|
|
|
|
[accessibilityElements release];
|
|
|
|
@@ -588,18 +575,17 @@ index 523f79d235..a885249f30 100644
|
|
|
|
[[self menu] release];
|
|
|
|
[[self menu] release];
|
|
|
|
[super dealloc];
|
|
|
|
[super dealloc];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -11426,6 +11664,10 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
|
|
|
|
@@ -11426,6 +11658,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
|
|
|
|
|
|
|
|
|
|
|
|
windowClosing = NO;
|
|
|
|
windowClosing = NO;
|
|
|
|
processingCompose = NO;
|
|
|
|
processingCompose = NO;
|
|
|
|
+#ifdef NS_IMPL_COCOA
|
|
|
|
+#ifdef NS_IMPL_COCOA
|
|
|
|
+ childFrameLastBuffer = Qnil;
|
|
|
|
+ childFrameLastBuffer = Qnil;
|
|
|
|
+ voiceoverSetPoint = NO;
|
|
|
|
|
|
|
|
+#endif
|
|
|
|
+#endif
|
|
|
|
scrollbarsNeedingUpdate = 0;
|
|
|
|
scrollbarsNeedingUpdate = 0;
|
|
|
|
fs_state = FULLSCREEN_NONE;
|
|
|
|
fs_state = FULLSCREEN_NONE;
|
|
|
|
fs_before_fs = next_maximized = -1;
|
|
|
|
fs_before_fs = next_maximized = -1;
|
|
|
|
@@ -12734,6 +12976,154 @@ - (id)accessibilityFocusedUIElement
|
|
|
|
@@ -12734,6 +12969,154 @@ - (id)accessibilityFocusedUIElement
|
|
|
|
The existing elements carry cached state (modiff, point) from the
|
|
|
|
The existing elements carry cached state (modiff, point) from the
|
|
|
|
previous redisplay cycle. Rebuilding first would create fresh
|
|
|
|
previous redisplay cycle. Rebuilding first would create fresh
|
|
|
|
elements with current values, making change detection impossible. */
|
|
|
|
elements with current values, making change detection impossible. */
|
|
|
|
@@ -754,7 +740,7 @@ index 523f79d235..a885249f30 100644
|
|
|
|
- (void)postAccessibilityUpdates
|
|
|
|
- (void)postAccessibilityUpdates
|
|
|
|
{
|
|
|
|
{
|
|
|
|
NSTRACE ("[EmacsView postAccessibilityUpdates]");
|
|
|
|
NSTRACE ("[EmacsView postAccessibilityUpdates]");
|
|
|
|
@@ -12744,11 +13134,64 @@ - (void)postAccessibilityUpdates
|
|
|
|
@@ -12744,11 +13127,64 @@ - (void)postAccessibilityUpdates
|
|
|
|
|
|
|
|
|
|
|
|
/* Re-entrance guard: VoiceOver callbacks during notification posting
|
|
|
|
/* Re-entrance guard: VoiceOver callbacks during notification posting
|
|
|
|
can trigger redisplay, which calls ns_update_end, which calls us
|
|
|
|
can trigger redisplay, which calls ns_update_end, which calls us
|
|
|
|
|