diff options
| author | Tom Dalziel <tom_dl@hotmail.com> | 2024-04-02 19:38:37 +0200 |
|---|---|---|
| committer | Tom Dalziel <tom_dl@hotmail.com> | 2024-04-02 19:38:37 +0200 |
| commit | 88d073c9d03ca223564e7e8589f44ecc87c98153 (patch) | |
| tree | 6f2f0402fe3dc958f2d4dfc3ccd16e47abeb7892 /evil-tests.el | |
| parent | 004ac4e0cd766d49d48d53270e9c0c080ad9f173 (diff) | |
Fix point placement after D and C in normal state
Bug since 476f5fbcf1288c5a46a6ba35efe0b8dd1e4dd0ec
Thanks to @axelf4 for spotting.
Diffstat (limited to 'evil-tests.el')
| -rw-r--r-- | evil-tests.el | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/evil-tests.el b/evil-tests.el index 8ca961f..259c6ff 100644 --- a/evil-tests.el +++ b/evil-tests.el @@ -2166,7 +2166,37 @@ ine3 line3 line3 l\n")) ;; This is line three" ("v$D") ";; This is line one -;; This is line three"))) +;; This is line three")) + (ert-info ("Deletion in normal state leaves point in the right place") + (evil-test-buffer + "alpha b[r]avo charlie\ndelta echo foxtrot\ngolf hotel india" + (should (not evil-start-of-line)) + ("D") + "alpha [b]\ndelta echo foxtrot\ngolf hotel india" + ("/echo" [return] "C" "newtext" [escape]) + "alpha b\ndelta newtex[t]\ngolf hotel india") + (let ((evil-start-of-line t)) + (evil-test-buffer + "alpha b[r]avo charlie\ndelta echo foxtrot\ngolf hotel india" + ("D") + "alpha [b]\ndelta echo foxtrot\ngolf hotel india" + ("/echo" [return] "C" "newtext" [escape]) + "alpha b\ndelta newtex[t]\ngolf hotel india"))) + (ert-info ("Line deletion in visual state leaves point in the right place") + (evil-test-buffer + "alpha [b]ravo charlie\ndelta echo foxtrot\ngolf hotel india" + (should (not evil-start-of-line)) + ("vD") + "delta [e]cho foxtrot\ngolf hotel india" + ("vX") + "golf h[o]tel india") + (let ((evil-start-of-line t)) + (evil-test-buffer + "alpha [b]ravo charlie\ndelta echo foxtrot\ngolf hotel india" + ("vD") + "[d]elta echo foxtrot\ngolf hotel india" + ("vX") + "[g]olf hotel india")))) (ert-deftest evil-test-delete-folded () "Test `evil-delete' on folded lines." |
