diff options
| author | Tom Dalziel <tom_dl@hotmail.com> | 2024-04-01 23:21:07 +0200 |
|---|---|---|
| committer | Tom Dalziel <33435574+tomdl89@users.noreply.github.com> | 2024-04-14 21:29:49 +0200 |
| commit | e31bff8cb64d773bbfd9a8e326db8645eaee43fd (patch) | |
| tree | a1fe3e2173e2a41de05d09ac85361b164619f9cc /evil-tests.el | |
| parent | 27c9dce3cf49bb3714820d4485bdade8c70434e0 (diff) | |
Visual eol anchoring, so g$ is sticky
Also fixes #1876
Diffstat (limited to 'evil-tests.el')
| -rw-r--r-- | evil-tests.el | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/evil-tests.el b/evil-tests.el index f22a669..88a8aa5 100644 --- a/evil-tests.el +++ b/evil-tests.el @@ -3529,6 +3529,29 @@ Below some empty line" ("Gkgk") (should (not (bolp))))) +(ert-deftest evil-test-end-of-visual-line () + "Test `evil-end-of-visual-line'." + :tags '(evil motion) + (skip-unless (and (not noninteractive) (> (window-width) 2))) + (evil-test-buffer + "alpha bravo charlie\nd[e]lta echo\nfoxtrot golf hotel india" + ("g$" "gj") + "alpha bravo charlie\ndelta echo\nfoxtrot golf hotel indi[a]" + ("gkgk") + "alpha bravo charli[e]\ndelta echo\nfoxtrot golf hotel india" + ("ro" "2gj") + "alpha bravo charlio\ndelta echo\nfoxtrot golf hotel[ ]india")) + +(ert-deftest evil-test-eol-anchoring-with-visual-line-movement () + "Test gj and gk once the cursor is anchored at eol with $." + :tags '(evil motion) + (skip-unless (and (not noninteractive) (> (window-width) 2))) + (evil-test-buffer + "Short [l]ine\nA longer line\nThird line" + (visual-line-mode 1) + ("$gj") + "Short line\nA longer lin[e]\nThird line")) + (ert-deftest evil-test-other-commands-preserve-column () "Test other comamnds preserve the column, when appropriate." :tags '(evil motion) |
