Skip to content

Commit

Permalink
fix(selection): show chars if marking backwards on single line
Browse files Browse the repository at this point in the history
  • Loading branch information
Walheimat committed Oct 30, 2024
1 parent 682eca7 commit f862b23
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 9 additions & 0 deletions test/whale-line-segments-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,15 @@
(push-mark))
(goto-char (+ 4 (point-min)))

(should (string= "4" (whale-line-segments--selection--marked))))

(with-temp-buffer
(insert-file-contents rectangle)
(goto-char (+ 4 (point-min)))
(shut-up
(push-mark))
(goto-char (point-min))

(should (string= "4" (whale-line-segments--selection--marked)))))

(ert-deftest animation-animate ()
Expand Down
8 changes: 5 additions & 3 deletions whale-line-segments.el
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,11 @@ single line show the columns."

(if (or (> line-count 1)
(and (= line-count 1)
(= (point) (save-excursion
(beginning-of-line)
(point)))))
(> (point) beg)
(= (point)
(save-excursion
(beginning-of-line)
(point)))))
(whale-line-segments--selection--rows)
(whale-line-segments--selection--columns))))

Expand Down

0 comments on commit f862b23

Please sign in to comment.