emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master d88cdad: Fix term.el handling of ^Z-sequences spann


From: Noam Postavsky
Subject: [Emacs-diffs] master d88cdad: Fix term.el handling of ^Z-sequences spanning chunks
Date: Thu, 5 Jan 2017 04:24:50 +0000 (UTC)

branch: master
commit d88cdad2847726438c7d1de9fd2651c4be9243aa
Author: Johan Claesson <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Fix term.el handling of ^Z-sequences spanning chunks
    
    Bash will after each command send ?\032 and the current directory "/tmp"
    to inform term.el.  Bash output is buffered in 4096 bytes chunks.  If a
    command outputs roughly 4096 bytes then the end of the first chunk will
    be "/tm" (Bug#13350).
    
    * lisp/term.el (term-emulate-terminal): Change the regexp to find the
    end of the ?\032 sequence to use \n instead of $, the latter can match
    end of string as well.
    
    Copyright-paperwork-exempt: yes
---
 lisp/term.el |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/term.el b/lisp/term.el
index a3933ae..5259571 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -2903,12 +2903,12 @@ See `term-prompt-regexp'."
                          (beep t))
                         ((and (eq char ?\032)
                                (not handled-ansi-message))
-                         (let ((end (string-match "\r?$" str i)))
+                         (let ((end (string-match "\r?\n" str i)))
                            (if end
                                (funcall term-command-hook
                                         (decode-coding-string
                                          (prog1 (substring str (1+ i) end)
-                                           (setq i (match-end 0)))
+                                           (setq i (1- (match-end 0))))
                                          locale-coding-system))
                              (setq term-terminal-parameter (substring str i))
                              (setq term-terminal-state 4)



reply via email to

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