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

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

[elpa] externals/coterm 1342022 1/2: Move point before output insertion


From: ELPA Syncer
Subject: [elpa] externals/coterm 1342022 1/2: Move point before output insertion
Date: Fri, 15 Oct 2021 10:57:25 -0400 (EDT)

branch: externals/coterm
commit 134202250ec0a2b0fe5a7eaf9d195e201d26d480
Author: Miha Rihtaršič <miha@kamnitnik.top>
Commit: Miha Rihtaršič <miha@kamnitnik.top>

    Move point before output insertion
    
    Insertion may fire up a minibuffer because of
    'comint-watch-for-password-prompt' and we don't want the point to be at a
    random position during the minibuffer.
---
 coterm.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/coterm.el b/coterm.el
index 64ebb1b..dbbd06c 100644
--- a/coterm.el
+++ b/coterm.el
@@ -837,8 +837,10 @@ NEWLINES is the number of newlines STR contains.  Unless 
it is
 zero, insertion must happen at the end of accessible portion of
 buffer and the scrolling region must cover the whole screen."
   (coterm--t-adjust-pmark proc-filt process)
-  (coterm--t-apply-proc-filt proc-filt process str)
-  (goto-char (process-mark process))
+  (let ((pmark (process-mark process)))
+    (goto-char pmark)
+    (coterm--t-apply-proc-filt proc-filt process str)
+    (goto-char pmark))
   (let ((column (current-column)))
     (if (zerop newlines)
         (if coterm--t-insert-mode



reply via email to

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