Skip to content

Commit

Permalink
refac(segments,org): use truncate-string-ellipsis for default
Browse files Browse the repository at this point in the history
  • Loading branch information
Walheimat committed Oct 14, 2024
1 parent e98928d commit 40a17a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/whale-line-segments-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@
(whale-line-segments--minions--list)))))))

(ert-deftest org--maybe-truncate--truncates ()
(should (string= "test" (whale-line-segments--org--maybe-truncate "testing" 'success 5))))
(should (string= (concat "test" (truncate-string-ellipsis)) (whale-line-segments--org--maybe-truncate "testing" 'success 5))))

(ert-deftest org--maybe-truncate--skips ()
(should (string= "testing" (whale-line-segments--org--maybe-truncate "testing" 'success 7))))
Expand Down
3 changes: 2 additions & 1 deletion whale-line-segments.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

;;; Code:

(require 'mule-util)
(require 'whale-line)

;;;; Customization
Expand Down Expand Up @@ -48,7 +49,7 @@ frame."
:group 'whale-line-segments
:type 'string)

(defcustom whale-line-segments-org-ellipsis ""
(defcustom whale-line-segments-org-ellipsis (truncate-string-ellipsis)
"The string indicating truncation of a heading."
:group 'whale-line-segments
:type 'string)
Expand Down

0 comments on commit 40a17a7

Please sign in to comment.