Commit Graph

18 Commits

Author SHA1 Message Date
Martin Sukany
98b3d04597 Revert "patches: add 0009 resource safety hardening + update 0007/0008"
This reverts commit acc2a2985e.
2026-02-28 19:05:02 +01:00
acc2a2985e patches: add 0009 resource safety hardening + update 0007/0008
New patch 0009 fixes HIGH severity issues from Opus review:
- Announcement coalescing (50ms debounce)
- cachedText retain+autorelease in accessibilityValue
- EmacsView dealloc: nil out emacsView on all AX elements
- Nil guards on protocol methods + overlayZoomActive

0007 updated: revert accidental em-dash→triple-dash, add overlayZoomActive nil guards
0008 updated: specpdl exception safety for accessibilityUpdating, lastChildFrameBuffer staticpro

Series now 9 patches total (0001-0006 unchanged, 0007-0009 new/updated).
2026-02-28 18:45:30 +01:00
0f7608326c patches: fix 2 blockers from Opus review
BLOCKER #1: accessibilityUpdating flag exception safety.
A Lisp signal (longjmp) during postAccessibilityUpdates left
the re-entrance flag permanently YES, suppressing all future
AX notifications → VoiceOver goes silent randomly.
Fix: specpdl unwind protection (record_unwind_protect_ptr)
resets the flag on any longjmp. All 3 exit points use unbind_to.

BLOCKER #2: static struct buffer *lastBuffer dangling pointer.
Raw C pointer to buffer struct has no GC protection. After
kill-buffer, the pointer dangles.
Fix: file-scope Lisp_Object lastChildFrameBuffer with staticpro.
EQ comparison instead of pointer equality.

Also: revert accidental em-dash → triple-dash in title bar (0007),
fix README factual error (BUF_OVERLAY_MODIFF cache key).
2026-02-28 18:29:19 +01:00
c05b46b058 patches: 0007 textDidChange fix (hl-line-mode), remove config workaround 2026-02-28 17:42:00 +01:00
edbed0a116 patches: 0007 fix hl-line-mode blocking SelectedTextChanged
hl-line-mode (and similar) bumps BUF_MODIFF via text property
changes on every cursor movement. The else-if structure caused
the modiff branch to fire (skipping ValueChanged correctly) but
also blocked the cursor-move branch (SelectedTextChanged).

Fix: use textDidChange flag to decouple the two branches.
ValueChanged and SelectedTextChanged remain mutually exclusive
for real edits, but SelectedTextChanged now fires when only
text properties changed.
2026-02-28 17:38:05 +01:00
2d053f5a92 patches: 0008 fix EmacsAccessibilityBuffer class name 2026-02-28 17:24:44 +01:00
4c7ce352cd patches: 0008 focus restore after child frame close + corfu delay 2s
- childFrameCompletionActive flag: set by child frame handler,
  cleared when no child frame visible on parent's next cycle
- Posts FocusedUIElementChanged on parent buffer element to
  restore VoiceOver character echo after corfu closes
- corfu-auto-delay: 1.0 → 2.0 (reduce popup noise)
2026-02-28 17:21:44 +01:00
afa65a8201 patches: 0008 restored to confirmed working version (3e5fe81)
Pure version: direct UAZoomChangeFocus, specpdl_ref, re-entrance
guard, buffer switch + unbind_to. No window announcement suppression
(all attempts broke VoiceOver focus tracking or Zoom).
2026-02-28 17:08:49 +01:00
e09b8c61f0 patches: 0008 - setTitle:empty instead of setAccessibilityElement:NO 2026-02-28 17:04:06 +01:00
306cde4f79 patches: restore 0008 + setAccessibilityElement:NO (no Zoom changes)
Restore working 0008 (direct UAZoomChangeFocus, specpdl_ref fix,
re-entrance guard, buffer switch). Only addition: suppress child
frame window announcement via setAccessibilityElement:NO.
No overlayZoomRect/overlayZoomActive changes — 0007 untouched.
2026-02-28 16:59:05 +01:00
9772b7e33e patches: drop 0008 (child frame), revert 0007 to clean state
Child frame completion (Corfu) will be handled via config:
corfu-terminal-mode renders as overlays → patch 0007 handles it.
2026-02-28 16:48:53 +01:00
1455542227 patches: 0008 - GroupRole + focus restore + overlayZoom reset
- NSAccessibilityGroupRole (no window announcement, focus tracking OK)
- FocusedUIElementChanged on parent when corfu closes
- overlayZoomActive = NO reset each parent cycle (handles C-g + frame delete)
2026-02-28 16:43:26 +01:00
5a58e3b925 patches: 0008 - setAccessibilityElement:NO (suppress window announcement) 2026-02-28 16:34:41 +01:00
2dc4182856 patches: 0008 - Zoom via parent overlayZoomRect + suppress window announcement 2026-02-28 16:29:26 +01:00
3e5fe814b8 patches: 0008 fix specpdl_ref type (not ptrdiff_t) 2026-02-28 16:19:08 +01:00
5aa0f05a33 patches: 0008 fix current_buffer bug + unbind_to on all return paths
Fbuffer_substring_no_properties operates on current_buffer, not the
passed buffer. Added set_buffer_internal_1 + record_unwind_current_buffer
with unbind_to on every return path.
2026-02-28 16:15:41 +01:00
659b9e2a1e patches: 0008 fix - re-entrance guard + modiff gate + safety checks
Root cause: child frame path bypassed accessibilityUpdating guard.
Lisp calls in announceChildFrameCompletion triggered redisplay →
ns_update_end → postAccessibilityUpdates → infinite recursion.
2026-02-28 16:11:23 +01:00
a8af58cff1 patches: split 0007 (overlay) + 0008 (child frame)
0007: Vertico/Icomplete/Ivy overlay completion, Zoom at text left edge
0008: Corfu/Company-box child frame completion, direct UAZoomChangeFocus
2026-02-28 16:02:13 +01:00