Skip to content

Commit

Permalink
Fix a-word on whitespace-only line
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdl89 committed May 29, 2023
1 parent 1f603b1 commit b7bc385
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion evil-common.el
Original file line number Diff line number Diff line change
Expand Up @@ -3020,7 +3020,9 @@ linewise, otherwise it is character wise."
(count (abs (or count 1)))
(objbnd (let ((b (bounds-of-thing-at-point thing)))
(and b (< (point) (cdr b)) b)))
(bnd (or objbnd (evil-bounds-of-not-thing-at-point thing)))
(bnd (or objbnd
(evil-bounds-of-not-thing-at-point thing)
(cons (point-min) (point-max))))
addcurrent other)
;; check if current object is not selected
(when (or (not beg) (not end)
Expand Down
4 changes: 4 additions & 0 deletions evil-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -6147,6 +6147,10 @@ Line 2"))
(evil-test-buffer
"foo\n[ ]\nbar"
("diw")
"foo\n[]\nbar")
(evil-test-buffer
"foo\n[ ]\nbar"
("daw")
"foo\n[]\nbar")))

(ert-deftest evil-test-word-objects-cjk ()
Expand Down

0 comments on commit b7bc385

Please sign in to comment.