aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjixiufeng <jixiufeng@luojilab.com>2019-06-11 14:47:36 +0800
committerjixiufeng <jixiufeng@luojilab.com>2019-06-11 14:47:36 +0800
commit0128da8b8c8571165386949205dc63cc71167dcb (patch)
treecc897e167d364fc3c92da63e4771c0e63b492de7
parentdb9679d77dda82299f7c3aab79a3f5b0967ddce3 (diff)
check buffer-live-p in vterm--filter
-rw-r--r--vterm.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/vterm.el b/vterm.el
index 1789c1b..cc10a51 100644
--- a/vterm.el
+++ b/vterm.el
@@ -300,10 +300,12 @@ Argument BUFFER the terminal buffer."
Then triggers a redraw from the module."
(let ((inhibit-redisplay t)
- (inhibit-read-only t))
- (with-current-buffer (process-buffer process)
- (vterm--write-input vterm--term input)
- (vterm--update vterm--term))))
+ (inhibit-read-only t)
+ (buf (process-buffer process)))
+ (when (buffer-live-p buf)
+ (with-current-buffer buf
+ (vterm--write-input vterm--term input)
+ (vterm--update vterm--term)))))
(defun vterm--sentinel (process event)
"Sentinel of vterm PROCESS.