REGRESSION: fold/unfold in org-mode, outline-mode and hideshow-mode did
not refresh VoiceOver text because ensureTextCache used BUF_CHARS_MODIFF
which is NOT bumped by (put-text-property ... 'invisible), the mechanism
used by modern org-fold-core (org >= 29) and outline-mode to hide text.
VoiceOver would continue reading folded content as if visible, or miss
newly unfolded content entirely, because the text cache was considered
valid despite the visible-text having changed.
Revert ensureTextCache to BUF_MODIFF with an explanatory comment:
- BUF_CHARS_MODIFF is bumped only on character insertions/deletions, not
text-property changes. Fold/unfold uses text properties for visibility.
- BUF_OVERLAY_MODIFF alone is also insufficient: org >= 29 uses text
properties, not overlays, for folding. Also hl-line-mode bumps
BUF_OVERLAY_MODIFF every post-command-hook --- same per-keystroke cost
as BUF_MODIFF, with none of its correctness guarantee.
- BUF_MODIFF cost is acceptable: ensureTextCache is called only when
VoiceOver queries AX properties (human interaction speed, not redisplay
speed). Rebuild cost is O(visible-buffer-text).
Also retain C-n/C-p line-read fix from previous commit (7a0b4f6):
FocusedUIElementChanged excluded for sequential isCtrlNP moves.
16 KiB
16 KiB