branch: externals/dtache
commit 5a26fa0cb127765757a92cf91d6789ac7db73e45
Author: Niklas Eklund <[email protected]>
Commit: Niklas Eklund <[email protected]>
Fix broken command width
---
detached.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/detached.el b/detached.el
index 3c7ea8357d..0d5fa93a5e 100644
--- a/detached.el
+++ b/detached.el
@@ -897,7 +897,10 @@ Optionally CONCAT the command return command into a
string."
"Return SESSION's command as a string restrict it to MAX-LENGTH."
(let ((command (detached--session-command session)))
(if (<= (length command) max-length)
- command
+ (truncate-string-to-width
+ command
+ max-length
+ 0 ?\s)
(concat (substring (detached--session-command session) 0 (- max-length
3)) "..."))))
;;;; Support functions