[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 40e9cec 2/2: Fix background mode on Gnome 3.38 terminals
From: |
Lars Ingebrigtsen |
Subject: |
master 40e9cec 2/2: Fix background mode on Gnome 3.38 terminals |
Date: |
Sun, 27 Dec 2020 22:10:03 -0500 (EST) |
branch: master
commit 40e9cec7d2b81d1dd1c7254acfdd5075f52040b5
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix background mode on Gnome 3.38 terminals
* lisp/term/xterm.el (xterm--version-handler): Adjust to Gnome
3.38 (bug#43891).
---
lisp/term/xterm.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 7094100..b3f240a 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -710,15 +710,18 @@ Return the pasted text as a string."
(while (and (setq chr (xterm--read-event-for-query)) (not (equal chr ?c)))
(setq str (concat str (string chr))))
;; Since xterm-280, the terminal type (NUMBER1) is now 41 instead of 0.
- (when (string-match "\\([0-9]+\\);\\([0-9]+\\);0" str)
+ (when (string-match "\\([0-9]+\\);\\([0-9]+\\);[01]" str)
(let ((version (string-to-number (match-string 2 str))))
- (when (and (> version 2000) (equal (match-string 1 str) "1"))
+ (when (and (> version 2000)
+ (or (equal (match-string 1 str) "1")
+ (equal (match-string 1 str) "65")))
;; 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 2.32.1 reports 1;2802;0
;; Gnome terminal 3.6.1 reports 1;3406;0
;; Gnome terminal 3.22.2 reports 1;4601;0 and *does* support
;; background color querying (Bug#29716).
+ ;; Gnome terminal 3.38.0 reports 65;6200;1.
(when (> version 4000)
(xterm--query "\e]11;?\e\\"
'(("\e]11;" . xterm--report-background-handler))))