branch: externals/detached
commit c80f56061514a5e480592527a1ccec699b522ae7
Author: Niklas Eklund <[email protected]>
Commit: Niklas Eklund <[email protected]>

    Fix missing detached buffer session for shell mode
    
    The buffer session was not set properly for shell mode. This issue was
    introduced recently when adding the detached list interface.
---
 detached-shell.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/detached-shell.el b/detached-shell.el
index e0ab5c39c3..2d19e0a29d 100644
--- a/detached-shell.el
+++ b/detached-shell.el
@@ -108,8 +108,10 @@ cluttering the `comint-history' with dtach commands."
 (defun detached-shell--create-input-sender (proc string)
   "Create a detached session based on STRING and send to PROC."
   (with-connection-local-variables
-   (let* ((command (detached--shell-command
-                    (substring-no-properties string) t)))
+   (let* ((session
+           (detached-create-session (substring-no-properties string)))
+          (command (detached--shell-command session t)))
+     (setq detached--buffer-session session)
      (comint-simple-send proc command))))
 
 (defun detached-shell--comint-read-input-ring-advice (orig-fun &rest args)

Reply via email to