diff options
| author | Eli Zaretskii | 2015-05-09 16:06:48 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2015-05-09 16:06:48 +0300 |
| commit | d2c7e14ac3bd2b517d35a86255c28d5b6d779451 (patch) | |
| tree | 7f11ff990bbbf1a4f6564fb879a12d5e0c0d631b | |
| parent | b18353c61c699d4917f8dfed95fc43b8a691b5ad (diff) | |
| download | emacs-d2c7e14ac3bd2b517d35a86255c28d5b6d779451.tar.gz emacs-d2c7e14ac3bd2b517d35a86255c28d5b6d779451.zip | |
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.el | 6 |
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." | |||
| 6000 | ;; that will get us to the same place on the screen | 6000 | ;; that will get us to the same place on the screen |
| 6001 | ;; but with a more reasonable buffer position. | 6001 | ;; but with a more reasonable buffer position. |
| 6002 | (goto-char normal-location) | 6002 | (goto-char normal-location) |
| 6003 | (let ((line-beg (line-beginning-position))) | 6003 | (let ((line-beg |
| 6004 | ;; We want the real line beginning, so it's consistent | ||
| 6005 | ;; with bolp below, otherwise we might infloop. | ||
| 6006 | (let ((inhibit-field-text-motion t)) | ||
| 6007 | (line-beginning-position)))) | ||
| 6004 | (while (and (not (bolp)) (invisible-p (1- (point)))) | 6008 | (while (and (not (bolp)) (invisible-p (1- (point)))) |
| 6005 | (goto-char (previous-char-property-change (point) line-beg)))))))) | 6009 | (goto-char (previous-char-property-change (point) line-beg)))))))) |
| 6006 | 6010 | ||