Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extensions/vi-mode/registers.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
(region-string (start end end-col)
(concatenate 'string
(points-to-string start end)
(make-string (- end-col (point-charpos end))
(make-string (- end-col (point-column end))
:initial-element #\Space))))
(destructuring-bind (start-line end-line)
(sort (list (line-number-at-point start)
Expand Down
13 changes: 12 additions & 1 deletion extensions/vi-mode/tests/visual.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,18 @@
(testing "左下"
(with-vi-buffer (#?"あいうえお\nか[き]くけこ\nさしすせそ\n")
(cmd "<C-v>hjx")
(ok (buf= #?"あいうえお\n[く]けこ\nすせそ\n")))))))
(ok (buf= #?"あいうえお\n[く]けこ\nすせそ\n")))))

(testing "挿入"
(testing "右"
(with-vi-buffer (#?"あいうえお\nか[き]くけこ\nさしすせそ\n")
(cmd "<C-v>jlxlp")
(ok (buf= #?"あいうえお\nかけこ[き]く\nさせそしす\n"))))

(testing "左"
(with-vi-buffer (#?"あいうえお\nか[き]くけこ\nさしすせそ\n")
(cmd "<C-v>jlxhP")
(ok (buf= #?"あいうえお\n[き]くかけこ\nしすさせそ\n")))))))

(deftest visual-swap-points
(with-fake-interface ()
Expand Down