summaryrefslogtreecommitdiff
path: root/lisp/terminal.el
diff options
context:
space:
mode:
authorJakob L. Kreuze2022-06-04 22:59:43 -0400
committerJakob L. Kreuze2022-06-04 22:59:43 -0400
commit0e453758898b91d01c2d77326851dc3e7274855b (patch)
treebcf42665beff13d07b6a894a3f2b1ec61d81c3b0 /lisp/terminal.el
parent857a4443ea76df1be7ff3a36523438eb10d2ed89 (diff)
[term] Support titles for simultaneously-open terminals
Diffstat (limited to 'lisp/terminal.el')
-rw-r--r--lisp/terminal.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/terminal.el b/lisp/terminal.el
index 31787a1..c69e569 100644
--- a/lisp/terminal.el
+++ b/lisp/terminal.el
@@ -10,7 +10,7 @@
;;;
;; Global variable that we use for the custom modeline.
-(defvar vterm-buffer-title nil
+(defvar vterm-buffer-titles (make-hash-table)
"Title set by shell program.")
;; Some niceties for creating VTerm buffers with descriptive names.
@@ -45,7 +45,7 @@ Otherwise, switch to the first available vterm buffer."
:config
(defun vterm--set-title (title)
"Use TITLE to set the buffer name according to `vterm-buffer-name-string'."
- (setq vterm-buffer-title title))
+ (puthash (current-buffer) title vterm-buffer-titles))
;; Custom keybindings for cycling through open VTerm buffers.
:bind

© 2015 - 2026 Jakob L. Kreuze