From 23467374f5d1426c88f4e414c3699b817ca77781 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 4 Apr 2019 15:13:48 -0400 Subject: [PATCH] Fix doom/forward-to-last-non-comment-or-eol #1306 This command would no-op if used in major modes with "fake" comments. i.e. modes where "comments" are merely highlighted as comments, but have no comment entry in its syntax table. e.g. text-mode + git-commit-mode. --- core/autoload/text.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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