Skip to content

Commit 07aa7a3

Browse files
committed
gptel-transient: Use proper ellipsis for consistent UI
* gptel-transient.el (gptel-option-overlaid): Use a proper ellipsis (…) instead of three ASCII dots (...) when truncating the user instruction, provided Unicode is displayable and `truncate-string-ellipsis' is nil. This change allows for two additional characters and enhances visual appeal and consistency. Also, increase width to 35 to use most available space without making the whole tansient wider. Fix a typo in docstring.
1 parent 285856e commit 07aa7a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gptel-transient.el

+2-2
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ This is used only for setting this variable via `gptel-menu'.")
512512
"Transient options for overlays displayed in the working buffer.")
513513

514514
(cl-defmethod transient-format-value ((obj gptel-option-overlaid))
515-
"set up the in-buffer overlay for additional directive, a string.
515+
"Set up the in-buffer overlay for additional directive, a string.
516516
517517
Also format its value in the Transient menu."
518518
(let ((value (oref obj value))
@@ -532,7 +532,7 @@ Also format its value in the Transient menu."
532532
(add-hook 'transient-exit-hook ov-clear-hook)))
533533
;; Updating transient menu display
534534
(if value
535-
(propertize (concat argument (truncate-string-to-width value 25 nil nil "..."))
535+
(propertize (concat argument (truncate-string-to-width value 35 nil nil t))
536536
'face 'transient-value)
537537
(propertize
538538
(concat "(" (symbol-name (oref obj display-nil)) ")")

0 commit comments

Comments
 (0)