File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1673,6 +1673,7 @@ of the block."
16731673 (funcall delete-func beg end type register yank-handler)
16741674 (cond
16751675 ((eq type 'line)
1676+ (setq this-command 'evil-change-whole-line) ; for evil-maybe-remove-spaces
16761677 (if (= opoint (point))
16771678 (evil-open-above 1)
16781679 (evil-open-below 1)))
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ commands opening a new line."
9999 evil-open-below
100100 evil-append
101101 evil-append-line
102+ evil-change-whole-line
102103 newline
103104 newline-and-indent
104105 indent-and-newline)))
Original file line number Diff line number Diff line change @@ -2114,6 +2114,28 @@ for this test."))
21142114ABCIf you want to create a file, visit that file with C-x C-f,
21152115ABCthen enter the text in that file's own buffer.")))
21162116
2117+ (ert-deftest evil-maybe-remove-spaces-test ()
2118+ "Test maybe removing (indentation) spaces after some commands when making a clear line."
2119+ :tags '(evil operator)
2120+ (ert-info ("changing the line and returning to normal mode removes spaces")
2121+ (evil-test-buffer
2122+ (emacs-lisp-mode)
2123+ ("i(one two" [return] "three" [return] "four" [return] "five" [escape] "?three" [return])
2124+ "(one two
2125+ [t]hree
2126+ four
2127+ five"
2128+ ("cc" "new line" [escape] "+")
2129+ "(one two
2130+ new line
2131+ [f]our
2132+ five"
2133+ ("cc" [escape])
2134+ "(one two
2135+ new line
2136+ []
2137+ five")))
2138+
21172139(ert-deftest evil-test-change-word ()
21182140 "Test changing words"
21192141 :tags '(evil operator)
You can’t perform that action at this time.
0 commit comments