summaryrefslogtreecommitdiff
path: root/lisp/term
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-04-22 16:35:33 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-04-22 16:35:33 -0400
commitf7e0450a3707d408ac32e4694e4c87ec37d4d204 (patch)
tree8d665347c7720bc4e52bb06a72cfff1b854804e4 /lisp/term
parent34e856d5ac828753b7be20e2471f39fb613f7f40 (diff)
downloademacs-f7e0450a3707d408ac32e4694e4c87ec37d4d204.tar.gz
* lisp/term/xterm.el (xterm--version-handler): Don't use modern xterm
features on gnome-terminal. Fixes: debbugs:16988
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/xterm.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index eac40141979..52487f3bded 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -503,6 +503,12 @@ The relevant features are:
;; Since xterm-280, the terminal type (NUMBER1) is now 41 instead of 0.
(when (string-match "\\([0-9]+\\);\\([0-9]+\\);0" str)
(let ((version (string-to-number (match-string 2 str))))
+ (when (and (> version 2000) (equal (match-string 1 str) "1"))
+ ;; Hack attack! bug#16988: gnome-terminal reports "1;NNNN;0"
+ ;; with a large NNNN but is based on a rather old xterm code.
+ ;; Gnome terminal 3.6.1 reports 1;3406;0
+ ;; Gnome terminal 2.32.1 reports 1;2802;0
+ (setq version 200))
;; If version is 242 or higher, assume the xterm supports
;; reporting the background color (TODO: maybe earlier
;; versions do too...)