From d76d50c1c9f0a48b24672c31cd86635a435e72c1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 10 Mar 2021 12:30:26 -0500 Subject: [PATCH] Fix #4676: one-off on go-to-EOL if comment at BOL Before this commit: 1. With `|;;; hello` 2. Press `C-e`: `;|;; hello` 3. Press `C-e` again: `;;; hello|` After: 1. With `|;;; hello` 2. Press `C-e`: `;;; hello|` 3. Press `C-e` again: `|;;; hello` --- core/autoload/text.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/autoload/text.el b/core/autoload/text.el index 73f56d40a..e3113335f 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -149,8 +149,10 @@ in some cases." (> (point) bol)) (backward-char)) (skip-chars-backward " " bol) - (unless (or (eq (char-after) 32) (eolp)) - (forward-char)) + (or (eq (char-after) 32) + (eolp) + (bolp) + (forward-char)) (point))) eol))) (list bol bot eot eol))))