1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00

(isearch-done): If search ends in middle of intangible

text (due to text property), move on to the limit of that text.
This commit is contained in:
Richard M. Stallman 1999-07-02 12:53:04 +00:00
parent 094d978996
commit df01192be7

View File

@ -647,6 +647,17 @@ is treated as a regexp. See \\[isearch-forward] for more info."
(force-mode-line-update)
;; If we ended in the middle of some intangible text,
;; move to the further end of that intangible text.
(let ((after (if (eobp) nil
(get-text-property (point) 'intangible)))
(before (if (bobp) nil
(get-text-property (1- (point)) 'intangible))))
(when (and before after (eq before after))
(if isearch-forward
(goto-char (next-single-property-change (point) 'intangible))
(goto-char (previous-single-property-change (point) 'intangible)))))
(if (and (> (length isearch-string) 0) (not nopush))
;; Update the ring data.
(isearch-update-ring isearch-string isearch-regexp))
@ -1613,9 +1624,9 @@ If there is no completion possible, say so and continue searching."
;; Check that invisibility runs up to END.
(save-excursion
(goto-char beg)
(let
(let (
;; can-be-opened keeps track if we can open some overlays.
((can-be-opened (eq search-invisible 'open))
(can-be-opened (eq search-invisible 'open))
;; the list of overlays that could be opened
(crt-overlays nil))
(when (and can-be-opened isearch-hide-immediately)