diff --git a/core/autoload/text.el b/core/autoload/text.el index 51486d559..2dd0184e1 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -54,7 +54,9 @@ true end of the line. The opposite of `doom/backward-to-bol-or-indent'." (end-of-visual-line) (end-of-line)) (point)))) - (if (and (sp-point-in-comment) (not (= (point) eol))) + (if (or (and (< (point) eol) + (sp-point-in-comment)) + (not (sp-point-in-comment eol))) (goto-char eol) (let* ((bol (save-excursion (beginning-of-visual-line) (point))) (boc (or (save-excursion