patches: fix encoding + cursor sync + echo area
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
From a238db02b1d26210a61106c804c8dd012e93fc52 Mon Sep 17 00:00:00 2001
|
From d3915c6f58a0db4f8c0e3d681e207dbcda0e18f1 Mon Sep 17 00:00:00 2001
|
||||||
From: Martin Sukany <martin@sukany.cz>
|
From: Martin Sukany <martin@sukany.cz>
|
||||||
Date: Sat, 28 Feb 2026 16:01:29 +0100
|
Date: Sat, 28 Feb 2026 16:01:29 +0100
|
||||||
Subject: [PATCH 8/8] ns: announce child frame completion candidates for
|
Subject: [PATCH 8/8] ns: announce child frame completion candidates for
|
||||||
@@ -20,8 +20,8 @@ element when a child frame completion closes.
|
|||||||
doc/emacs/macos.texi | 6 -
|
doc/emacs/macos.texi | 6 -
|
||||||
etc/NEWS | 4 +-
|
etc/NEWS | 4 +-
|
||||||
src/nsterm.h | 9 ++
|
src/nsterm.h | 9 ++
|
||||||
src/nsterm.m | 338 +++++++++++++++++++++++++++++++++++++++++--
|
src/nsterm.m | 341 +++++++++++++++++++++++++++++++++++++++++--
|
||||||
4 files changed, 334 insertions(+), 23 deletions(-)
|
4 files changed, 337 insertions(+), 23 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 6514dfc..f47929e 100644
|
index 6514dfc..f47929e 100644
|
||||||
@@ -97,7 +97,7 @@ index 21a93bc..bbce9fe 100644
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||||
index 8d44b5f..e05608f 100644
|
index 8d44b5f..a6d2bf1 100644
|
||||||
--- a/src/nsterm.m
|
--- a/src/nsterm.m
|
||||||
+++ b/src/nsterm.m
|
+++ b/src/nsterm.m
|
||||||
@@ -7415,6 +7415,112 @@ visual line index for Zoom (skip whitespace-only lines
|
@@ -7415,6 +7415,112 @@ visual line index for Zoom (skip whitespace-only lines
|
||||||
@@ -301,7 +301,7 @@ index 8d44b5f..e05608f 100644
|
|||||||
specpdl_ref count2 = SPECPDL_INDEX ();
|
specpdl_ref count2 = SPECPDL_INDEX ();
|
||||||
record_unwind_current_buffer ();
|
record_unwind_current_buffer ();
|
||||||
if (b != current_buffer)
|
if (b != current_buffer)
|
||||||
@@ -9352,6 +9481,46 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
|
@@ -9352,6 +9481,49 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
|
||||||
if (!b)
|
if (!b)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -326,7 +326,10 @@ index 8d44b5f..e05608f 100644
|
|||||||
+ set_buffer_internal (b);
|
+ set_buffer_internal (b);
|
||||||
+ Lisp_Object ls = Fbuffer_string ();
|
+ Lisp_Object ls = Fbuffer_string ();
|
||||||
+ set_buffer_internal (prev);
|
+ set_buffer_internal (prev);
|
||||||
+ NSString *raw = [NSString stringWithUTF8String: SSDATA (ls)];
|
+ /* Use stringWithLispString: — it converts Emacs's internal
|
||||||
|
+ multibyte encoding to NSString correctly, unlike a raw
|
||||||
|
+ UTF-8 cast via SSDATA which fails for non-ASCII text. */
|
||||||
|
+ NSString *raw = [NSString stringWithLispString: ls];
|
||||||
+ NSString *msg = [raw stringByTrimmingCharactersInSet:
|
+ NSString *msg = [raw stringByTrimmingCharactersInSet:
|
||||||
+ [NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
+ [NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||||
+ if ([msg length] > 0)
|
+ if ([msg length] > 0)
|
||||||
@@ -348,7 +351,7 @@ index 8d44b5f..e05608f 100644
|
|||||||
ptrdiff_t modiff = BUF_MODIFF (b);
|
ptrdiff_t modiff = BUF_MODIFF (b);
|
||||||
ptrdiff_t point = BUF_PT (b);
|
ptrdiff_t point = BUF_PT (b);
|
||||||
BOOL markActive = !NILP (BVAR (b, mark_active));
|
BOOL markActive = !NILP (BVAR (b, mark_active));
|
||||||
@@ -9488,6 +9657,16 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
@@ -9488,6 +9660,16 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||||
granularity = ns_ax_text_selection_granularity_line;
|
granularity = ns_ax_text_selection_granularity_line;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,7 +368,7 @@ index 8d44b5f..e05608f 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
|
||||||
@@ -9931,6 +10110,10 @@ - (void)dealloc
|
@@ -9931,6 +10113,10 @@ - (void)dealloc
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
[accessibilityElements release];
|
[accessibilityElements release];
|
||||||
@@ -376,7 +379,7 @@ index 8d44b5f..e05608f 100644
|
|||||||
[[self menu] release];
|
[[self menu] release];
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
@@ -11380,6 +11563,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
|
@@ -11380,6 +11566,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
|
||||||
|
|
||||||
windowClosing = NO;
|
windowClosing = NO;
|
||||||
processingCompose = NO;
|
processingCompose = NO;
|
||||||
@@ -386,7 +389,7 @@ index 8d44b5f..e05608f 100644
|
|||||||
scrollbarsNeedingUpdate = 0;
|
scrollbarsNeedingUpdate = 0;
|
||||||
fs_state = FULLSCREEN_NONE;
|
fs_state = FULLSCREEN_NONE;
|
||||||
fs_before_fs = next_maximized = -1;
|
fs_before_fs = next_maximized = -1;
|
||||||
@@ -12688,6 +12874,80 @@ - (id)accessibilityFocusedUIElement
|
@@ -12688,6 +12877,80 @@ - (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. */
|
||||||
@@ -467,7 +470,7 @@ index 8d44b5f..e05608f 100644
|
|||||||
- (void)postAccessibilityUpdates
|
- (void)postAccessibilityUpdates
|
||||||
{
|
{
|
||||||
NSTRACE ("[EmacsView postAccessibilityUpdates]");
|
NSTRACE ("[EmacsView postAccessibilityUpdates]");
|
||||||
@@ -12698,11 +12958,59 @@ - (void)postAccessibilityUpdates
|
@@ -12698,11 +12961,59 @@ - (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
|
||||||
|
|||||||
Reference in New Issue
Block a user