aboutsummaryrefslogtreecommitdiff
path: root/evil-tests.el
AgeCommit message (Collapse)Author
2024-07-21Remove unnecessary post-command hook runTom Dalziel
2024-07-12Add tests for multi-jumpTom Dalziel
2024-07-10gi works in visual line stateTom Dalziel
2024-07-10make C-w in ex, search, and eval match insert and replace (#1922)Lily
* make C-w in ex and search match insert and replace merely changed bindings and added a test * fix evil-delete-backward-word in ex test
2024-06-16Record search offset for repeatTom Dalziel
Fixes #1907
2024-06-14Track (and restore) previous visual selection, point, mark for gvTom Dalziel
2024-06-14Only restore visual if there's something to restoreTom Dalziel
2024-06-03Ex-substitute: use last search's case-sensitivityTom Dalziel
2024-05-31ci: Use Eask to test macos and windows (#1885)Jen-Chieh Shen
* ci: Use Eask to test macos and windows * ci: Install eask * ci: Fix jump file test * revert spaces * ci: skip find-file test on windows * ci: Revert original test for windows * Delete Cask file * ci: Exclude tests on macos below 28.x
2024-05-13Fix block pasting at bolp on empty lineTom Dalziel
2024-05-13Chosing register keeps eol anchoring in visual block stateTom Dalziel
2024-05-06Backreferences in vim-style regexpTom Dalziel
Fixes #1895
2024-04-30Small cleanupsAxel Forsman
2024-04-30Remove evil--visual-eol-anchoredAxel Forsman
There already exists a method for sticking to EOL: Setting temporary-goal-column to most-positive-fixnum. As such, there is no need for the variable evil--visual-eol-anchored introduced by commit e31bff8cb64d773bbfd9a8e326db8645eaee43fd. This commit also fixes a regression where "g$" made "gj"/"gk" stick to visual EOLs.
2024-04-30Don't mutate register when stripping test props during pasteTom Dalziel
Fixes an issue noticed while triaging #1894
2024-04-21Fix Visual Insert affecting one too many linesAxel Forsman
This fixes a regression caused by commit 004ac4e0cd766d49d48d53270e9c0c080ad9f173, where Visual mode "I" repeated the insertion on one too many lines unless at EOB.
2024-04-16treewide: replace `(eq/equal foo nil)` with `(null foo)`Konstantin Kharlamov
2024-04-16TIL should-not existsTom Dalziel
2024-04-15Always undo in normal state (#1888)Tom Dalziel
2024-04-14Visual eol anchoring, so g$ is stickyTom Dalziel
Also fixes #1876
2024-04-04evil-undo is a jump commandTom Dalziel
Partially fixes #1878
2024-04-02Fix point placement after D and C in normal stateTom Dalziel
Bug since 476f5fbcf1288c5a46a6ba35efe0b8dd1e4dd0ec Thanks to @axelf4 for spotting.
2024-04-01Don't miss a final empty line in visual block insertionTom Dalziel
2024-03-31Visual X, deletion column respects stick eolTom Dalziel
2024-03-31Add handler for expanding line for line-based operatorsTom Dalziel
Most of the work was done by Maxi Wolff (@smile13241324) over 6yrs ago. I've made a few changes, so have assumed authorship. This fixes #968
2024-03-24Handle args-out-of-range error in evil-repeat-startTom Dalziel
Fixes #1110
2024-01-23No performant delete if range suppliedTom Dalziel
Fixes #1858
2024-01-04Fix pasting charwise text onto linewise selectionTom Dalziel
2023-12-25Declare goto-char as a motion, fix evil-goto-charTom Dalziel
Tests added for evil-goto-char. Fixes #1852
2023-12-18Add :retab commandJakub Kadlcik
See "Changing tabs" section in the Vim manual https://vimhelp.org/change.txt.html#change.txt
2023-12-15Fix jumping to next/prev paren/brace from a string is not working (#1849)Mihai Cristian Tanase
2023-09-20Disable vim-style-regexp conversions of already converted patterns (#1827)Tom Dalziel
* (Failing) test for `&` with very-magic vim-style backreferences * Disable vim-style-regexp conversions of already converted patterns
2023-08-27Reselect minibuffer when quitting command-line winAxel Forsman
Pressing C-f while editing an Ex command to open the command-line window and later quitting that window used to not reselect the Ex command line, but instead just continue the recursive edit in some previous window. This was specially confusing before commit 02004bce6884619e687654d333b75c90f8fc27d0, as the evil-ex-abort hack did not trigger, leaving you in a bad state with evil-ex-current-buffer set to t. This commit fixes that by setting the delete-window window parameter on the command-line window to a function that switches back to the minibuffer after deleting the window, which closes #1379. This commit also replaces the split-window call with a display-buffer invocation, to always spawn the window at the bottom of the frame, but also allow the user to override this behavior.
2023-08-27Do not silence unused evil-define-command argumentAxel Forsman
2023-08-20Some cleanupsAxel Forsman
2023-08-20Misc minor changesStefan Monnier
* README.md: Mention that `undo-fu` is also in NonGNU ELPA and update its repository URL. * evil.el: Update the undo-fu repository URL. * evil-macros.el (evil-define-interactive-code): Move the insertion of quote around `func` to the `cond` so the `quote` is not incorrectly added around lambda forms. * evil-tests.el: Add a FIXME. * evil-commands.el (evil-save-side-windows): Silence spurious warning.
2023-08-20Stop the '</'> and '[/'] marks from intertwiningAxel Forsman
The function evil-visual-paste would assign to evil-visual-point/-mark the same markers used by the '[ and '] marks. Therefore, after a single visual paste Normal mode "gv" would act funkily in that buffer ever after. To reproduce: * Enter a new buffer with the contents: x y * With the cursor on "x", type "ylvpjxgv". The expectation is that "x" should be re-selected. Instead the empty lower line is selected due to it being the previously changed text. This commit fixes this, and also removes unused definitions related to evil-visual-previous-point/-mark.
2023-08-20Avoid eval in evil-test-bufferAxel Forsman
Whatever is returned by the macro will be evaluated anyway. This fixes errors due to lexical-binding now being enabled in evil-tests.
2023-08-20Use lexical-binding everywhereStefan Monnier
Most of the code already used lexical-binding, but there were still a few of remnant of use of the old dynbound dialect. * evil-tests.el: Activate `lexical-binding`. (evil-test-change-state): Initialize the local vars immediately rather than as a separate step. Remove unused vars `keymap` and `local-keymap`. (evil-test-auxiliary-maps): Rename local var to `evil--map` and declare it dynbound since we need `evil-define-key` to have access to it. (evil-test-exclusive-type): Remove unused var `third`. (evil-test-text-object): Mark unused var `type`. (evil-with-both-search-modules): Move before first use. (evil-test-properties): Rename local var to `evil--alist` and declare it dynbound since we need `evil-put-property` to have access to it. * evil.el: Activate `lexical-binding`. * evil-types.el ("<addr>"): * evil-common.el (evil--eval-expr): * evil-commands.el (evil-ex-global): Tell `eval` to use the lexbind dialect of ELisp.
2023-08-13Urgent revert of recent commits while evil is brokenTom Dalziel
Some of these commits can be almost immediately restored, once the time is found to do so. Revert "Fix evil-with-delay with dynamic binding" This reverts commit 1e9b2434264529fe0dd964b68fe89236a4abeac3. Revert "Some cleanups" This reverts commit 0cbd61f2de104fab16602d0418605cd0513b16f3. Revert "Misc minor changes" This reverts commit b291039b0c6ffc3b2f3c9f02b8ad2f0041127b12. Revert "Merge evil-with-delay condition and body lambdas" This reverts commit 1b56ffcc102b4c5f8b015e760b5f9cf5932622af. Revert "(evil-with-delay): New macro, extracted from `evil-delay`" This reverts commit 3d7faadf30016a8c20699a5fb1b5731b8a49dcd2. Revert "Make evil-search-wrap-ring-bell work with evil-search" This reverts commit 5e72cf5b6d57b785ea229236bb5c4638db2c9a05. Revert "Stop the '</'> and '[/'] marks from intertwining" This reverts commit 26db9441a13ebedb2481d7ada4c3b5e60ec22795. Revert "Remove redundant `:group` args" This reverts commit 6e30037fdc6a275d78d6b82d89bd8e47bcf4d4e3. Revert "Avoid eval in evil-test-buffer" This reverts commit 27d81ad406d2d3e07591b927357d2354ef5b5c65. Revert "Use lexical-binding everywhere" This reverts commit 44c7f301468c264a781be4ee8ae879fe1b457e60.
2023-08-12Some cleanupsAxel Forsman
2023-08-12Misc minor changesStefan Monnier
* README.md: Mention that `undo-fu` is also in NonGNU ELPA and update its repository URL. * evil.el: Update the undo-fu repository URL. * evil-macros.el (evil-define-interactive-code): Move the insertion of quote around `func` to the `cond` so the `quote` is not incorrectly added around lambda forms. * evil-tests.el: Add a FIXME. * evil-commands.el (evil-save-side-windows): Silence spurious warning.
2023-08-09Stop the '</'> and '[/'] marks from intertwiningAxel Forsman
The function evil-visual-paste would assign to evil-visual-point/-mark the same markers used by the '[ and '] marks. Therefore, after a single visual paste Normal mode "gv" would act funkily in that buffer ever after. To reproduce: * Enter a new buffer with the contents: x y * With the cursor on "x", type "ylvpjxgv". The expectation is that "x" should be re-selected. Instead the empty lower line is selected due to it being the previously changed text. This commit fixes this, and also removes unused definitions related to evil-visual-previous-point/-mark.
2023-08-07Avoid eval in evil-test-bufferAxel Forsman
Whatever is returned by the macro will be evaluated anyway. This fixes errors due to lexical-binding now being enabled in evil-tests.
2023-08-07Use lexical-binding everywhereStefan Monnier
Most of the code already used lexical-binding, but there were still a few of remnant of use of the old dynbound dialect. * evil-tests.el: Activate `lexical-binding`. (evil-test-change-state): Initialize the local vars immediately rather than as a separate step. Remove unused vars `keymap` and `local-keymap`. (evil-test-auxiliary-maps): Rename local var to `evil--map` and declare it dynbound since we need `evil-define-key` to have access to it. (evil-test-exclusive-type): Remove unused var `third`. (evil-test-text-object): Mark unused var `type`. (evil-with-both-search-modules): Move before first use. (evil-test-properties): Rename local var to `evil--alist` and declare it dynbound since we need `evil-put-property` to have access to it. * evil.el: Activate `lexical-binding`. * evil-types.el ("<addr>"): * evil-common.el (evil--eval-expr): * evil-commands.el (evil-ex-global): Tell `eval` to use the lexbind dialect of ELisp.
2023-08-07Select inner tag even when emptyTom Dalziel
Fixes part of #1815
2023-08-07Prefer #' to quote function namesStefan Monnier
2023-07-17Read Ex commands from bufferAxel Forsman
When lexing a string with string-match and its START argument, there is no way to anchor matches to the START position. Instead, one must either allocate substrings - as done prior to commit 56b43b6f7e014e905f85df1c542c67f46ea99566 - or use looking-at etc., instead. This commit opts for the latter. The Ex completion-at-point functions are also rewritten in order to avoid having to add ex-index text properties to the command string, since evil--ex-syntactic-context could be extended to provide that information just as easily.
2023-07-12Avoid marker for match-end in :substituteAxel Forsman
2023-07-09Autoload evil-digraphAxel Forsman