Skip to content

Commit

Permalink
support range
Browse files Browse the repository at this point in the history
  • Loading branch information
blahgeek committed Apr 14, 2024
1 parent 8953e1a commit fc79578
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 @@ -4227,11 +4227,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 fc79578

Please sign in to comment.