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.
This commit is contained in:
Henrik Lissner 2019-04-04 15:13:48 -04:00
parent bf2aedc510
commit 23467374f5
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -54,7 +54,9 @@ true end of the line. The opposite of `doom/backward-to-bol-or-indent'."
(end-of-visual-line) (end-of-visual-line)
(end-of-line)) (end-of-line))
(point)))) (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) (goto-char eol)
(let* ((bol (save-excursion (beginning-of-visual-line) (point))) (let* ((bol (save-excursion (beginning-of-visual-line) (point)))
(boc (or (save-excursion (boc (or (save-excursion