Don't use current-column to find the horizontal position.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 1 Feb 2011 02:25:48 +0000 (18:25 -0800)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 1 Feb 2011 02:25:48 +0000 (18:25 -0800)
It's fragile in the presence of \003 characters.

lisp/ChangeLog
lisp/gnus-art.el

index f24ce7f..3414778 100644 (file)
@@ -2,6 +2,8 @@
 
        * gnus-art.el (article-date-ut): Protect against articles with no Date
        header.
+       (article-update-date-lapsed): Don't use current-column to find the
+       horizontal position.  It's fragile in the presence of \003 characters.
 
        * gnus-start.el (gnus-read-active-file-1): Remove dead parameter infos.
 
index 07eabd9..af47daf 100644 (file)
@@ -3645,7 +3645,7 @@ function and want to see what the date was before converting."
           (set-buffer (window-buffer w))
           (when (eq major-mode 'gnus-article-mode)
             (let ((old-line (count-lines (point-min) (point)))
-                  (old-column (current-column)))
+                  (old-column (- (point) (line-beginning-position))))
               (goto-char (point-min))
               (while (re-search-forward "^Date:" nil t)
                 (let ((type (get-text-property (match-beginning 0) 'gnus-date-type)))