bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12354: 24.2; garbage inserted at the beginning of the buffer even wh


From: Andreas Schwab
Subject: bug#12354: 24.2; garbage inserted at the beginning of the buffer even when xterm-extra-capabilities is t
Date: Sat, 08 Sep 2012 11:57:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Does this help?

Andreas.

diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 28fb9da..b93bc5e 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -519,6 +519,9 @@ The relevant features are:
       ;; Device Attributes (DA)" query.
       (send-string-to-terminal "\e[>0c")
 
+      ;; Wait a bit before trying to read the answer
+      (sleep-for 0.1)
+
       ;; The reply should be: \e [ > NUMBER1 ; NUMBER2 ; NUMBER3 c
       ;; If the timeout is completely removed for read-event, this
       ;; might hang for terminals that pretend to be xterm, but don't
@@ -541,6 +544,7 @@ The relevant features are:
                      (>= version 242)))
        (discard-input)
         (send-string-to-terminal "\e]11;?\e\\")
+       (sleep-for 0.1)
         (when (and (equal (read-event nil nil 2) ?\e)
                    (equal (read-event nil nil 2) ?\]))
           (setq str "")

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





reply via email to

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