]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/replace.el (occur-after-change-function): Fix logic mistake
authorMattias Engdegård <mattiase@acm.org>
Mon, 26 Jul 2021 07:15:04 +0000 (09:15 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 26 Jul 2021 07:15:04 +0000 (09:15 +0200)
lisp/replace.el

index f8c5fed55789e66170a62473685df05e8c454480..d0c63669159a7b6349d408bdc93b6db5db509c07 100644 (file)
@@ -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))))