summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgmont Koblinger <egmont@gmail.com>2014-12-11 20:17:25 +0100
committerEgmont Koblinger <egmont@gmail.com>2014-12-11 20:17:25 +0100
commita72436b76c25ec33cdf11d8731b866052aa0724a (patch)
tree9749ccfcf72f4e729c264549d7459ac9d83b4292
parent44ee72738ecfc254728222706faf2a7a2637033d (diff)
downloadvte-a72436b76c25ec33cdf11d8731b866052aa0724a.tar.gz
emulation: Change soft reset not to switch back to normal screen
This also works around an assertion failure due to incorrect cursor position, introduced in commit 5a434e6c4457bdfe182a13213396e7a66a08f767. https://bugzilla.gnome.org/show_bug.cgi?id=741406
-rw-r--r--src/vte.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/vte.c b/src/vte.c
index 22f54e95..07508c4e 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -8025,10 +8025,9 @@ vte_terminal_init(VteTerminal *terminal)
/* Initialize the screens and histories. */
_vte_ring_init (pvt->alternate_screen.row_data, terminal->pvt->row_count);
pvt->screen = &terminal->pvt->alternate_screen;
- _vte_terminal_set_default_attributes(terminal);
-
_vte_ring_init (pvt->normal_screen.row_data, VTE_SCROLLBACK_INIT);
pvt->screen = &terminal->pvt->normal_screen;
+
_vte_terminal_set_default_attributes(terminal);
/* Initialize charset modes. */
@@ -11832,16 +11831,14 @@ vte_terminal_reset(VteTerminal *terminal,
terminal->pvt->palette[i].sources[VTE_COLOR_SOURCE_ESCAPE].is_set = FALSE;
/* Reset the default attributes. Reset the alternate attribute because
* it's not a real attribute, but we need to treat it as one here. */
- pvt->screen = &pvt->alternate_screen;
- _vte_terminal_set_default_attributes(terminal);
- pvt->screen = &pvt->normal_screen;
_vte_terminal_set_default_attributes(terminal);
/* Reset charset modes. */
pvt->character_replacements[0] = VTE_CHARACTER_REPLACEMENT_NONE;
pvt->character_replacements[1] = VTE_CHARACTER_REPLACEMENT_NONE;
pvt->character_replacement = &pvt->character_replacements[0];
- /* Clear the scrollback buffers and reset the cursors. */
+ /* Clear the scrollback buffers and reset the cursors. Switch to normal screen. */
if (clear_history) {
+ pvt->screen = &pvt->normal_screen;
_vte_ring_reset(pvt->normal_screen.row_data);
_vte_ring_reset(pvt->alternate_screen.row_data);
pvt->normal_screen.saved.cursor.row = 0;