From a615252bebb6a65466d63630cbac9d668f1e5430 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 28 Mar 2002 18:27:23 +0000 Subject: [PATCH] (line-move-to-column): Don't call move-to-column if COL=0. --- lisp/simple.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index b9235eaf17f..8e4a52f4d32 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2633,7 +2633,9 @@ Outline mode sets this." This function works only in certain cases, because what we really need is for `move-to-column' and `current-column' to be able to ignore invisible text." - (move-to-column col) + (if (zerop col) + (beginning-of-line) + (move-to-column col)) (when (and line-move-ignore-invisible (not (bolp)) (line-move-invisible (1- (point)))) -- 2.39.2