[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * info/terminal.c (term_Km): Remove. (terminal_in
From: |
Gavin D. Smith |
Subject: |
branch master updated: * info/terminal.c (term_Km): Remove. (terminal_initialize_terminal): Do not load or set Km (kmous) capability string. As the termcap string for xterm can be "\033[<" rather than the "\033[M" we expected, we cannot rely on the contents of this. (initialize_byte_map): Add KEY_MOUSE bindings unconditionally. They are harmless even if mouse support is off. (terminal_begin_using_terminal): Do not use term_Km to decide whether to try to turn on "normal tracking mode". Instead, only use the se [...] |
Date: |
Sat, 12 Aug 2023 14:45:47 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new fe7d948f05 * info/terminal.c (term_Km): Remove.
(terminal_initialize_terminal): Do not load or set Km (kmous) capability
string. As the termcap string for xterm can be "\033[<" rather than the
"\033[M" we expected, we cannot rely on the contents of this.
(initialize_byte_map): Add KEY_MOUSE bindings unconditionally. They are
harmless even if mouse support is off. (terminal_begin_using_terminal): Do not
use term_Km to decide whether to try to turn on "normal tracking mode". Ins
[...]
fe7d948f05 is described below
commit fe7d948f05e4bb7751d7811a5da7fc4855b1dfda
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Aug 12 19:45:38 2023 +0100
* info/terminal.c (term_Km): Remove.
(terminal_initialize_terminal): Do not load or set Km (kmous)
capability string. As the termcap string for xterm can be
"\033[<" rather than the "\033[M" we expected, we cannot rely
on the contents of this.
(initialize_byte_map): Add KEY_MOUSE bindings unconditionally. They
are harmless even if mouse support is off.
(terminal_begin_using_terminal): Do not use term_Km to decide
whether to try to turn on "normal tracking mode". Instead, only
use the setting from the "mouse" variable.
(terminal_end_using_terminal): Likewise.
---
ChangeLog | 14 ++++++++++++++
info/terminal.c | 24 ++++++++----------------
2 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 04ebe4f04d..5a4479d875 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2023-08-12 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * info/terminal.c (term_Km): Remove.
+ (terminal_initialize_terminal): Do not load or set Km (kmous)
+ capability string. As the termcap string for xterm can be
+ "\033[<" rather than the "\033[M" we expected, we cannot rely
+ on the contents of this.
+ (initialize_byte_map): Add KEY_MOUSE bindings unconditionally. They
+ are harmless even if mouse support is off.
+ (terminal_begin_using_terminal): Do not use term_Km to decide
+ whether to try to turn on "normal tracking mode". Instead, only
+ use the setting from the "mouse" variable.
+ (terminal_end_using_terminal): Likewise.
+
2023-08-12 Gavin Smith <gavinsmith0123@gmail.com>
* tp/Texinfo/XS/xspara.c (xspara_get_state): Remove
diff --git a/info/terminal.c b/info/terminal.c
index 7a9793befc..f8eb1c29ff 100644
--- a/info/terminal.c
+++ b/info/terminal.c
@@ -123,9 +123,6 @@ static char *term_invbeg;
/* The string to turn off inverse mode, if this term has one. */
static char *term_invend;
-/* String introducing a mouse event. */
-static char *term_Km;
-
/* Strings entering and leaving standout mode. */
char *term_so, *term_se;
@@ -173,14 +170,12 @@ terminal_begin_using_terminal (void)
void (*sigsave) (int signum);
/* Turn on mouse reporting. This is "normal tracking mode" supported by
- xterm. The presence of the Km capability may not be a reliable way to
- tell whether this mode exists, but sending the following sequence is
- probably harmless if it doesn't. */
- if (mouse_protocol == MP_NORMAL_TRACKING
- && term_Km && !strcmp (term_Km, "\033[M"))
+ xterm.
+ We used to check the presence of the Km (kmous) termcap capability, but
+ it may be set to different values (either "\033[M" or "\033[<") for
+ xterm, so we cannot rely on the value of this capability. */
+ if (mouse_protocol == MP_NORMAL_TRACKING)
send_to_terminal ("\033[?1000h");
- else
- term_Km = 0;
if (term_keypad_on)
send_to_terminal (term_keypad_on);
@@ -214,7 +209,7 @@ terminal_end_using_terminal (void)
void (*sigsave) (int signum);
/* Turn off mouse reporting ("normal tracking mode"). */
- if (term_Km)
+ if (mouse_protocol == MP_NORMAL_TRACKING)
send_to_terminal ("\033[?1000l");
if (term_keypad_off)
@@ -880,8 +875,8 @@ initialize_byte_map (void)
add_seq_to_byte_map (keys2[i].key_id, keys2[i].byte_seq);
}
- if (term_Km)
- add_seq_to_byte_map (KEY_MOUSE, term_Km);
+ /* In case "normal tracking mode" is on. */
+ add_seq_to_byte_map (KEY_MOUSE, "\033[M");
/* Special case for ESC: Can introduce special key sequences, represent the
Meta key being pressed, or be a key on its own. */
@@ -1040,9 +1035,6 @@ terminal_initialize_terminal (char *terminal_name)
term_kB = tgetstr ("kB", &buffer);
- /* String introducing a mouse event. */
- term_Km = tgetstr ("Km", &buffer);
-
initialize_byte_map ();
/* If this terminal is not cursor addressable, then it is really dumb. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * info/terminal.c (term_Km): Remove. (terminal_initialize_terminal): Do not load or set Km (kmous) capability string. As the termcap string for xterm can be "\033[<" rather than the "\033[M" we expected, we cannot rely on the contents of this. (initialize_byte_map): Add KEY_MOUSE bindings unconditionally. They are harmless even if mouse support is off. (terminal_begin_using_terminal): Do not use term_Km to decide whether to try to turn on "normal tracking mode". Instead, only use the se [...],
Gavin D. Smith <=