diff options
author | Egmont Koblinger <egmont@gmail.com> | 2014-12-11 20:17:25 +0100 |
---|---|---|
committer | Egmont Koblinger <egmont@gmail.com> | 2014-12-11 20:17:25 +0100 |
commit | a72436b76c25ec33cdf11d8731b866052aa0724a (patch) | |
tree | 9749ccfcf72f4e729c264549d7459ac9d83b4292 | |
parent | 44ee72738ecfc254728222706faf2a7a2637033d (diff) | |
download | vte-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.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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; |