Skip to content

Commit

Permalink
support range
Browse files Browse the repository at this point in the history
  • Loading branch information
blahgeek committed Dec 16, 2024
1 parent 3919e22 commit 4d4d698
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions evil-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -4249,11 +4249,14 @@ Use `evil-flush-lines' if INVERT is nil, or `evil-keep-lines' if not."

(when (and evil-ex-global-command-interactive-highlight
(eq flag 'update))
(when evil-ex-range
(cl-destructuring-bind (beg end &rest)
(evil-expand-range evil-ex-range t)
(evil-ex-hl-set-region 'evil-ex-global beg end)))
(condition-case err
(let ((pattern (car (evil-ex-parse-global (or arg "")))))
(when (> (length pattern) 0)
(evil-ex-hl-change 'evil-ex-global
(evil-ex-make-pattern pattern evil-ex-search-case nil))))
(when-let ((pattern (car (evil-ex-parse-global (or arg "")))))
(evil-ex-hl-change 'evil-ex-global
(evil-ex-make-pattern pattern evil-ex-search-case nil)))
(user-error (evil-ex-echo (error-message-string err))))))))

(evil-define-operator evil-ex-global
Expand Down

0 comments on commit 4d4d698

Please sign in to comment.