]> git.eshelyaron.com Git - emacs.git/commitdiff
* simple.el (line-move-to-column): Constrain move-to-column to
authorChong Yidong <cyd@stupidchicken.com>
Thu, 3 Aug 2006 14:26:27 +0000 (14:26 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Thu, 3 Aug 2006 14:26:27 +0000 (14:26 +0000)
current field.

lisp/ChangeLog
lisp/simple.el

index 28c8ac15e40efc0f68b608b5a174fd53fa489905..d6ca6734af490c746f4a5cc177c09cfe3f3077bc 100644 (file)
@@ -1,3 +1,8 @@
+2006-08-03  Chong Yidong  <cyd@stupidchicken.com>
+
+       * simple.el (line-move-to-column): Constrain move-to-column to
+       current field.
+
 2006-08-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * font-lock.el (font-lock-beg, font-lock-end)
index 2af4bbd1d76ada6d41133dd1195493eefe839cd5..9288ab6bd79eab72a1dbe413922f8342d22c1901 100644 (file)
@@ -3697,7 +3697,10 @@ because what we really need is for `move-to-column'
 and `current-column' to be able to ignore invisible text."
   (if (zerop col)
       (beginning-of-line)
-    (move-to-column col))
+    (let ((opoint (point)))
+      (move-to-column col)
+      ;; move-to-column doesn't respect field boundaries.
+      (goto-char (constrain-to-field (point) opoint))))
 
   (when (and line-move-ignore-invisible
             (not (bolp)) (line-move-invisible-p (1- (point))))