]> code.delx.au - gnu-emacs/commitdiff
Avoid infloop in ERC
authorEli Zaretskii <eliz@gnu.org>
Sat, 9 May 2015 13:06:48 +0000 (16:06 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 9 May 2015 13:06:48 +0000 (16:06 +0300)
* lisp/simple.el (line-move-to-column): Ignore field boundaries
while computing line beginning position.  (Bug#20498)

lisp/simple.el

index 47c9cd30c177b4a44e12dfa24c74b1e9a8802d13..dfd92dcdc05237648faafa8e7cc2e5e7b84947a4 100644 (file)
@@ -6000,7 +6000,11 @@ and `current-column' to be able to ignore invisible text."
        ;; that will get us to the same place on the screen
        ;; but with a more reasonable buffer position.
        (goto-char normal-location)
-       (let ((line-beg (line-beginning-position)))
+       (let ((line-beg
+               ;; We want the real line beginning, so it's consistent
+               ;; with bolp below, otherwise we might infloop.
+               (let ((inhibit-field-text-motion t))
+                 (line-beginning-position))))
          (while (and (not (bolp)) (invisible-p (1- (point))))
            (goto-char (previous-char-property-change (point) line-beg))))))))