aboutsummaryrefslogtreecommitdiff
path: root/vterm.el
diff options
context:
space:
mode:
authorJames Cherti <60946298+jamescherti@users.noreply.github.com>2024-11-12 18:28:09 -0500
committerGabriele Bozzola <sbozzolator@gmail.com>2024-11-18 08:27:53 -0800
commitfd50624723200f4ac261f122f6332f57796c782f (patch)
tree6ab293c10cb97940902bfbfff0ed6ef79d82771b /vterm.el
parent188a8a12838bbfccb5021fff50cb54a2c9b66ea0 (diff)
Fixes #731: Replace the default truncation character ($) with a space
Set the truncation slot for 'buffer-display-table' to the ASCII code for a space character (32) to make the vterm buffer display a space instead of the default truncation character ($) when a line is truncated.
Diffstat (limited to 'vterm.el')
-rw-r--r--vterm.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/vterm.el b/vterm.el
index 5d4be95..8f71e77 100644
--- a/vterm.el
+++ b/vterm.el
@@ -813,6 +813,14 @@ Exceptions are defined by `vterm-keymap-exceptions'."
(vterm--set-pty-name vterm--term (process-tty-name vterm--process))
(process-put vterm--process 'adjust-window-size-function
#'vterm--window-adjust-process-window-size)
+
+ ;; Set the truncation slot for 'buffer-display-table' to the ASCII code for a
+ ;; space character (32) to make the vterm buffer display a space instead of
+ ;; the default truncation character ($) when a line is truncated.
+ (let* ((display-table (or buffer-display-table (make-display-table))))
+ (set-display-table-slot display-table 'truncation 32)
+ (setq buffer-display-table display-table))
+
;; Support to compilation-shell-minor-mode
;; Is this necessary? See vterm--compilation-setup
(setq next-error-function 'vterm-next-error-function)