diff options
| author | Tom Dalziel <33435574+tomdl89@users.noreply.github.com> | 2021-07-24 00:22:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-24 00:22:29 +0200 |
| commit | 566bc902732610471cb77e56639cf424a41745e7 (patch) | |
| tree | 3bd16f29b23ddc40120d0c0d183dd973c8ed77c9 /evil-ex.el | |
| parent | 6e4917d2fa96d8680df41a936c6dc49dc0dc1c41 (diff) | |
Add `*` ex-range for last visual range (#1500)
Diffstat (limited to 'evil-ex.el')
| -rw-r--r-- | evil-ex.el | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -65,6 +65,7 @@ ((\? space) (\? "\\(?:.\\|\n\\)+") #'$2)) (range ("%" #'(evil-ex-full-range)) + ("*" #'(evil-ex-last-visual-range)) (line ";" line #'(let ((tmp1 $1)) (save-excursion (goto-line tmp1) @@ -783,6 +784,10 @@ This function interprets special file names like # and %." "Return a range encompassing the whole buffer." (evil-range (point-min) (point-max) 'line)) +(defun evil-ex-last-visual-range () + "Return a linewise range of the last visual selection." + (evil-line-expand evil-visual-mark evil-visual-point)) + (defun evil-ex-marker (marker) "Return MARKER's line number in the current buffer. Signal an error if MARKER is in a different buffer." |
