aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-06-02Global print using messageTom Dalziel
2023-05-30Support p and # ex-substitute flagsTom Dalziel
2023-05-29Fix window-rotate upwards with 1 windowTom Dalziel
2023-05-29Fix pasting in visual block mode (#1786)Axel Forsman
Co-authored-by: Tom Dalziel <tom_dl@hotmail.com>
2023-05-29Fix a-word on whitespace-only lineTom Dalziel
2023-05-29Default to (point-min . point-max) for bndTom Dalziel
2023-05-22Re-indent last line join if onto blankTom Dalziel
2023-05-17Fix searching for literal < and > with very-magicTom Dalziel
2023-05-09evil-find-file-at-point-with-line: Support format path(line,col). (#1789)Quentin Barbe
Co-authored-by: Tom Dalziel <tom_dl@hotmail.com>
2023-04-21Support evil--jumps-push for dired-moderoxma
Add `evil--jumps-current-file-name` that returns `default-directory` in `evil--jumps-push` when dired-mode is active. The `dired-directory` can be properly re-opened by `find-file` called by future evil-jump-backward or evil-jump-forward.
2023-04-15Correct ibuffer keybindingAaron Jensen
2023-04-12evil-window-map: Detach current window into new tab with 'T'Ankit Pandey
2023-04-10evil-window-delete: Attempt to close tab if tab bar is enabledAnkit Pandey
2023-04-08Bind tab movement commands to motion stateAnkit Pandey
2023-03-22Defer loading of calc.elAxel Forsman
The function calc-eval is autoloaded so there is no need to eagerly require it.
2023-03-17Restore the input method on deactivation of evil-local-modeibbem
This ensures that the input method after deactivating evil-local-mode is the same as the input method used for states with a non-nil :input-method property. This issue was discovered while investigating why the input method couldn't be set by the agda2-mode while evil was active [1]. As the change in major mode (to agda2-mode) caused evil-local-mode to be disabled and reenabled by `define-globalized-minor-mode evil-mode`, the input method was lost because the default state (i.e. normal state) does have an :input-method property of nil. In summary this patch fixes the approach used by agda2-mode [2] and the official recommendation in the Emacs manual [3], e.g. (add-hook 'text-mode-hook (lambda () (set-input-method "german-prefix"))) [1]: https://github.com/agda/agda/issues/2141 [2]: https://github.com/agda/agda/blob/37554c46cbd770fa630f9b164e2b543506acbdbc/src/data/emacs-mode/agda2-mode.el#L432 [3]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Select-Input-Method.html
2023-03-17Fix evil-test-logical-visual-next-line in GUIAxel Forsman
The test was passing when run on text terminals but not on graphical terminals. This was because in TUIs, wrapping is indicated by a backslash that counts toward the width returned by window-width, but in GUIs a bent arrow (↩) is placed in the fringe instead, so one more character was needed in order to display a continuation line.
2023-03-04Remove evil-last-read-digraph-char hackAxel Forsman
With the Evil repeat system now aware of read-key, there is no need for the digraph repeat workaround introduced by commit dba2fa9907cf096f5e615df2e8b0381b643d47ee.
2023-03-04Advise read-key as well as read-key-sequenceWilliam G Hatch
2023-03-03Simplify evil-delimited-argumentsAxel Forsman
2023-02-20Restore match data after eval:ing replacementAxel Forsman
This fixes #1481. Also pass along the number of the current replacement to function called to generate each replacement, which fixes #1411.
2023-02-14Optimize Ex command completionAxel Forsman
With lexical binding it is possible to close over the list of Ex commands, instead of recomputing it on every keystroke while completing. Also, there is no need to call evil-ex-command-force-p on the command string, which uses try-completion, since the command functions are known as the evil-ex-commands alist values.
2023-02-14Compile Ex parserAxel Forsman
This commit reworks the function evil-parser into a macro that in turn expands to a parser. Some features that were not utilized have been dropped: * The GREEDY flag allowed backtracking to kick in instead of reporting an incomplete match. However the rules in cases where they are not deterministic are already listed in order of longest first. Lookaheads can still be used for this purpose. * Parsing is now always whitespace insensitive, but this is reversible without any hassle. * String replacement semantic actions. * (+ ...) rules no longer implicitly use seq. * Computation of the syntax tree has been deferred until when completion is requested.
2023-02-14Make Ex hooks not be permanentAxel Forsman
2023-02-07Defer loading of shell.elAxel Forsman
2023-02-07Simplify evil-move-cursor-backAxel Forsman
2023-02-06Exclude autoindentation from previous insertionAxel Forsman
Fixes #1761
2023-02-03Restore penultimate replacement on <BS>Axel Forsman
Previously if a character was overwritten many times from Replace state, backspacing over it would restore it to its original value, unlike in Vim.
2023-02-03Track composite changes to current insertion textAxel Forsman
The implementation of evil-track-last-insertion introduced in commit 477fe8e83e58739215ea3b601098ee134484114f assumed that all relevant changes look like atomic insertions/deletions, but e.g. remove-yank-excluded-properties upon yanking causes a single substitution change. This commit fixes that. A change not centered around the end of the previous insertion is also made to start a new range, like in Vim. Fixes #1759
2023-01-28Specialize evil-sort for case of two argumentsAxel Forsman
All current uses of evil-sort only pass two arguments, for which a conditional swap suffices. Also replace the implementation of evil-swap with cl-rotatef, since that is built-in and produces marginally better code for three or more variables.
2023-01-20Make sure to restore state after executing motionAxel Forsman
This fixes a regression caused by commit 29a5d464e973b66abae20e6c4b402a366547c7a5. Resolves #1756
2023-01-16Implement n, x, o, b, r options in :sortNathaniel Nicandro
Co-authored-by: Axel Forsman <axelsfor@gmail.com>
2023-01-15Re-add return-type evil-operator-range argumentAxel Forsman
It was removed by commit 29a5d464e973b66abae20e6c4b402a366547c7a5, however this broke the evil-surround package.
2023-01-14Use original state for populating shortcut mapAxel Forsman
Changing to Operator-pending state before executing (evil-extract-count (this-command-keys)) can give the wrong result since the actual binding used to invoke the operator may not be present in the new state. Resolves #1073
2023-01-14Add evil-scroll-end-column & evil-scroll-start-columnTom Dalziel
2023-01-12Fix executing macro infinite timesAxel Forsman
This commit fixes a regression caused by #1549 where you could no longer give a prefix argument to execute the macro in an infinite loop.
2023-01-12Use extended-format menu item for leader bindingsAxel Forsman
This fixes the issue of the evil-send-(local-)leader commands being recognized as the motion while in Operator-pending state. Additionally, describe-key (C-h k) can now be used to lookup keybindings using leader. Note that simply binding [(local-)leader] keyboard macros would not work, since then the command would not receive the prefix argument. Closes #1711
2023-01-12Fix evil-set-leader with nil state argumentAxel Forsman
The predicate (listp state) is true also for the value nil of state, meaning the correct clause with all-states was never considered. Closes #1383
2023-01-10Fix Fundamental mode hackAxel Forsman
This commit fixes some issues surrounding the initialization of Evil. First of all, since GNU Emacs 26.1 major mode hooks actually do run in Fundamental mode buffers. In any case, manually enabling fundamental-mode correctly instead of turn-on-evil-mode (by setting major-mode default) successfully enables evil-local-mode, as major mode hooks then run. The major-mode variable also never needed to be reset; it is the job of the major mode to set it, as it starts off as fundamental-mode regardless of its default value. Secondly, while some hooks and variables set up by evil-local-mode were marked as permanent, this did not matter as evil-initialize unconditionally reinitialized evil-local-mode whenever the major mode changed. Fixed by marking them all as permanent and not executing evil-local-mode if it is already enabled. Closes #1268, closes #1561
2023-01-10`evil-jump-item': don't error at `point-max'Nikita Bloshchanevich
`evil-jump-item' internally calls `evil-looking-at-start-comment', which fails at `point-max' because it checks `char-after' using `char-syntax'. Return nil in it if `point' = `point-max', because a comment cannot start at the end of the buffer (it would be 0 characters long).
2023-01-10Respect window params in evil-window-{next,prev}Johann Klähn
Co-authored-by: Axel Forsman <axelsfor@gmail.com>
2023-01-10Wrap just show-paren-data-function in adviceAxel Forsman
Instead of positioning the point and narrowing correctly for the entirety of show-paren-function, just do it for the show-paren-data-function call. This avoids duplicating the logic for removing stale overlays, which had to support both the new and old names of the once renamed show-paren--overlay variables. Not narrowing during show-paren-function also fixes an issue with the "mixed" show-paren-style, which uses pos-visible-in-window-p, see #1739. Closes #1739
2023-01-09Swap window sizes when exchanging windowsAxel Forsman
Use the function window-swap-states added in GNU Emacs 26.1 when available. Also leave the correct window selected, i.e. not the window that was originally selected. Closes #338
2023-01-09Error at boundaries with h/l even if point movedAxel Forsman
This matches the behavior of Vim in how repeated macros are aborted.
2023-01-09Use scroll-preserve-screen-position for C-u/C-dAxel Forsman
The built-in functions scroll-up/-down already support optionally preserving the cursor screen position while scrolling via CTRL-U and CTRL-D. This makes it unnecessary to do it manually through (let ((xy (evil-posn-x-y (posn-at-point)))) ... (goto-char (posn-point (posn-at-x-y (car xy) (cdr xy)))))
2023-01-08Fix Normal mode "D"/"C" with countAxel Forsman
Closes #1277
2023-01-08Skip overlays-in in evil-next-flyspell-errorAxel Forsman
Searching through the results of overlays-in, in addition to looping with next-overlay-change/overlays-at, is essentially doing the same work twice. This commit opts for only doing the latter. In addition, some other fixes are * Avoid requiring flyspell. * Fail immediately if no spelling error was found regardless of count, and signal error in that case so that macros are aborted like in Vim. * Echo a notice when search wrapped around. * Make "[s" and "s]" push the previous position onto the jump list. * Run tests when suitable spell checker other than aspell is available.
2023-01-07Fix evil-with-undo/evil-undo-pop with undo-treeToby S. Cubitt
Addresses #1074 - evil-with-undo: nconc'ing onto front of buffer-undo-list here can corrupt buffer-undo-list when in undo-tree-mode in rare circumstances (see issue #1074). Leave standard undo machinery to work as usual when undo is enabled. Deal with disabled undo by temporarily enabling then disabling undo, and transferring any undo changes to evil-temporary-undo. - evil-undo-pop: This function called `undo' directly from Elisp, which is wrong when in undo-tree-mode. Fix this by calling undo-tree-undo instead when in undo-tree-mode. Co-authored-by: Axel Forsman <axelsfor@gmail.com>
2023-01-07evil-show-paren-range: fix incorrect docstringBrian Leung
2023-01-06Update project KeywordsTom Dalziel