emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/with-editor 521f75e 3/3: with-editor-emulate-terminal: Ext


From: ELPA Syncer
Subject: [nongnu] elpa/with-editor 521f75e 3/3: with-editor-emulate-terminal: Extend search for editor instruction
Date: Thu, 28 Oct 2021 17:58:04 -0400 (EDT)

branch: elpa/with-editor
commit 521f75e3f37c7fe204bddb8a29ce862cae8f59bd
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    with-editor-emulate-terminal: Extend search for editor instruction
    
    The "WITH-EDITOR" instruction on stdout may follow other text on the
    same line (even in cases where that is not the case for `shell-mode',
    `eshell-mode' and `vterm').  Look for the instruction anywhere in the
    output, not just at the beginning of lines.
---
 with-editor.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/with-editor.el b/with-editor.el
index e079e81..c0bf1dd 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -757,7 +757,9 @@ This works in `shell-mode', `term-mode', `eshell-mode' and
 
 (defun with-editor-emulate-terminal (process string)
   "Like `term-emulate-terminal' but also handle edit requests."
-  (with-editor-sleeping-editor-filter process string)
+  (let ((with-editor-sleeping-editor-regexp
+         (substring with-editor-sleeping-editor-regexp 1)))
+    (with-editor-sleeping-editor-filter process string))
   (term-emulate-terminal process string))
 
 (defvar with-editor-envvars '("EDITOR" "GIT_EDITOR" "HG_EDITOR"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]