From 6b7c22e7ee87a57ff78e2baf0baa847e34b9b4da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Mon, 26 Jul 2021 09:15:04 +0200 Subject: [PATCH] ; * lisp/replace.el (occur-after-change-function): Fix logic mistake --- lisp/replace.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)))) -- 2.39.2