aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Dalziel <tom_dl@hotmail.com>2024-06-17 11:06:56 +0200
committerTom Dalziel <tom_dl@hotmail.com>2024-06-17 11:10:34 +0200
commit18962ce543530527d95b9fc3e7712c0d21c23e54 (patch)
tree023baac6a71f3d4accc9fe0160bdb66a8260106f
parent7bfdb135882495ab7528b87c121ddafc3640d60e (diff)
Use evil-first-non-blank instead of back-to-indentation for insert
Improves consistency
-rw-r--r--evil-commands.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/evil-commands.el b/evil-commands.el
index a75bead..6e2849f 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -2803,7 +2803,7 @@ or the beginning of visual line. The insertion will be repeated COUNT times.
If VCOUNT is non nil it should be number > 0. The insertion will be repeated
in the next VCOUNT - 1 lines below the current one."
(push (point) buffer-undo-list)
- (let ((move-fn (if non-blank-p #'back-to-indentation #'evil-beginning-of-line)))
+ (let ((move-fn (if non-blank-p #'evil-first-non-blank #'evil-beginning-of-line)))
(if (and visual-line-mode
evil-respect-visual-line-mode)
(goto-char
@@ -2813,15 +2813,15 @@ in the next VCOUNT - 1 lines below the current one."
(save-excursion
(beginning-of-visual-line)
(point))))
- (funcall move-fn)))
- (setq evil-insert-count count
- evil-insert-lines nil
- evil-insert-vcount
- (and vcount
- (> vcount 1)
- (list (line-number-at-pos)
- (if non-blank-p #'evil-first-non-blank #'evil-beginning-of-line)
- vcount)))
+ (funcall move-fn))
+ (setq evil-insert-count count
+ evil-insert-lines nil
+ evil-insert-vcount
+ (and vcount
+ (> vcount 1)
+ (list (line-number-at-pos)
+ move-fn
+ vcount))))
(evil-insert-state 1))
(defun evil-insert-line (count &optional vcount)