[vte] Bug 604241 - improve xterm emulation of set-scrolling-region behaviour
- From: Behdad Esfahbod <behdad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] Bug 604241 - improve xterm emulation of set-scrolling-region behaviour
- Date: Thu, 1 Apr 2010 06:17:45 +0000 (UTC)
commit bd2da3fd0fc436887a61a89b0dd367954fa36745
Author: Behdad Esfahbod <behdad behdad org>
Date: Thu Apr 1 02:16:56 2010 -0400
Bug 604241 - improve xterm emulation of set-scrolling-region behaviour
src/caps.c | 5 +++++
src/vteseq-n.gperf | 2 ++
src/vteseq.c | 26 ++++++++++++++++++++++++++
3 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/src/caps.c b/src/caps.c
index 26998ce..a63e2c3 100644
--- a/src/caps.c
+++ b/src/caps.c
@@ -496,8 +496,13 @@ struct _vte_capability_string _vte_xterm_capability_strings[] = {
{CSI "!p", "soft-reset", 0},
{CSI "%d;%d\"p", "set-conformance-level", 0},
{CSI "%d\"q", "select-character-protection", 0},
+
{CSI "r", "set-scrolling-region", 0},
+ {CSI ";r", "set-scrolling-region", 0},
+ {CSI ";%dr", "set-scrolling-region-from-start", 0},
+ {CSI "%d;r", "set-scrolling-region-to-end", 0},
{CSI "%d;%dr", "set-scrolling-region", 0},
+
{CSI "?%mr", "restore-mode", 0},
{CSI "s", "save-cursor", 0},
{CSI "?%ms", "save-mode", 0},
diff --git a/src/vteseq-n.gperf b/src/vteseq-n.gperf
index c60161e..8cbcb21 100644
--- a/src/vteseq-n.gperf
+++ b/src/vteseq-n.gperf
@@ -81,6 +81,8 @@ struct vteseq_n_struct {
"character-attributes", VTE_SEQUENCE_HANDLER(vte_sequence_handler_character_attributes)
"device-status-report", VTE_SEQUENCE_HANDLER(vte_sequence_handler_device_status_report)
"set-scrolling-region", VTE_SEQUENCE_HANDLER(vte_sequence_handler_set_scrolling_region)
+"set-scrolling-region-from-start", VTE_SEQUENCE_HANDLER(vte_sequence_handler_set_scrolling_region_from_start)
+"set-scrolling-region-to-end", VTE_SEQUENCE_HANDLER(vte_sequence_handler_set_scrolling_region_to_end)
#"set-text-property-21", VTE_SEQUENCE_HANDLER_NULL
#"set-text-property-2L", VTE_SEQUENCE_HANDLER_NULL
"cursor-preceding-line", VTE_SEQUENCE_HANDLER(vte_sequence_handler_cursor_preceding_line)
diff --git a/src/vteseq.c b/src/vteseq.c
index 691cf25..d27ad10 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -2522,6 +2522,32 @@ vte_sequence_handler_set_scrolling_region (VteTerminal *terminal, GValueArray *p
vte_sequence_handler_offset(terminal, params, -1, vte_sequence_handler_cs);
}
+static void
+vte_sequence_handler_set_scrolling_region_from_start (VteTerminal *terminal, GValueArray *params)
+{
+ GValue value = {0};
+
+ g_value_init (&value, G_TYPE_LONG);
+ g_value_set_long (&value, 0); /* Out of range means start/end */
+
+ g_value_array_insert (params, 0, &value);
+
+ vte_sequence_handler_offset(terminal, params, -1, vte_sequence_handler_cs);
+}
+
+static void
+vte_sequence_handler_set_scrolling_region_to_end (VteTerminal *terminal, GValueArray *params)
+{
+ GValue value = {0};
+
+ g_value_init (&value, G_TYPE_LONG);
+ g_value_set_long (&value, 0); /* Out of range means start/end */
+
+ g_value_array_insert (params, 1, &value);
+
+ vte_sequence_handler_offset(terminal, params, -1, vte_sequence_handler_cs);
+}
+
/* Set the application or normal keypad. */
static void
vte_sequence_handler_application_keypad (VteTerminal *terminal, GValueArray *params)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]