Commit bd2da3fd authored by Behdad Esfahbod's avatar Behdad Esfahbod

Bug 604241 - improve xterm emulation of set-scrolling-region behaviour

parent f74f7b2a
......@@ -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},
......
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment