Fix doom/forward-to-last-non-comment-or-eol when visual-line-mode is off #450

This commit is contained in:
Henrik Lissner 2018-03-05 02:59:21 -05:00
parent e6aad90db5
commit 55b2a6df68
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -51,7 +51,10 @@ beginning of the line. The opposite of
"Jumps between the last non-blank, non-comment character in the line and the
true end of the line. The opposite of `doom/backward-to-bol-or-indent'."
(interactive)
(let ((eol (save-excursion (end-of-visual-line) (point))))
(let ((eol (save-excursion (if visual-line-mode
(end-of-visual-line)
(end-of-line))
(point))))
(if (and (sp-point-in-comment) (not (= (point) eol)))
(goto-char eol)
(let* ((bol (save-excursion (beginning-of-visual-line) (point)))