From: Mattias EngdegÄrd Date: Mon, 26 Jul 2021 07:15:04 +0000 (+0200) Subject: ; * lisp/replace.el (occur-after-change-function): Fix logic mistake X-Git-Tag: emacs-28.0.90~1691 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6b7c22e7ee87a57ff78e2baf0baa847e34b9b4da;p=emacs.git ; * lisp/replace.el (occur-after-change-function): Fix logic mistake --- diff --git a/lisp/replace.el b/lisp/replace.el index f8c5fed5578..d0c63669159 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1407,9 +1407,9 @@ To return to ordinary Occur mode, use \\[occur-cease-edit]." (common-prefix (lambda (s1 s2) (let ((c (compare-strings s1 nil nil s2 nil nil))) - (if (zerop c) - (length s1) - (1- (abs c)))))) + (if (numberp c) + (1- (abs c)) + (length s1))))) (prefix-len (funcall common-prefix buf-str text)) (suffix-len (funcall common-prefix (reverse buf-str) (reverse text))))