Skip to content

Commit

Permalink
fix for dc
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxxr committed Sep 30, 2023
1 parent 00b3945 commit a392a73
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions extensions/vi-mode/commands/utils.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -163,21 +163,20 @@
(ignore-some-conditions (end-of-buffer)
(next-logical-line (1- (or uarg 1))))
(values start (copy-point (current-point)) :line))
;; Ignore an invalid operator (like 'dJ')
nil))
;; raise error for invalid commands
(error 'editor-abort :message nil)))
(otherwise
(call-motion command uarg)))))))))

(defun visual-region ()
(if (visual-p)
(values-list
(append (visual-range)
(list
(cond
((visual-line-p) :line)
((visual-block-p) :block)
(t :exclusive)))))
(values nil nil nil)))
(assert (visual-p))
(values-list
(append (visual-range)
(list
(cond
((visual-line-p) :line)
((visual-block-p) :block)
(t :exclusive))))))

(defun operator-region (motion &key move-point with-type)
(multiple-value-bind (start end type)
Expand Down

0 comments on commit a392a73

Please sign in to comment.