summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-05-09 16:06:48 +0300
committerEli Zaretskii <eliz@gnu.org>2015-05-09 16:06:48 +0300
commitd2c7e14ac3bd2b517d35a86255c28d5b6d779451 (patch)
tree7f11ff990bbbf1a4f6564fb879a12d5e0c0d631b
parentb18353c61c699d4917f8dfed95fc43b8a691b5ad (diff)
downloademacs-d2c7e14ac3bd2b517d35a86255c28d5b6d779451.tar.gz
Avoid infloop in ERC
* lisp/simple.el (line-move-to-column): Ignore field boundaries while computing line beginning position. (Bug#20498)
-rw-r--r--lisp/simple.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 47c9cd30c17..dfd92dcdc05 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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))))))))