[vte] Revert "emulation: Make clear compatible with xterm, don't add lines to scrollback"
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] Revert "emulation: Make clear compatible with xterm, don't add lines to scrollback"
- Date: Wed, 1 Apr 2015 23:01:21 +0000 (UTC)
commit 6e369a5d6e5d21dd6242b362c15a7c634483b0dc
Author: Egmont Koblinger <egmont gmail com>
Date: Thu Apr 2 01:00:07 2015 +0200
Revert "emulation: Make clear compatible with xterm, don't add lines to scrollback"
This reverts commit 450bf257266c1ec0f380e88a5512743acc6fc863.
https://bugzilla.gnome.org/show_bug.cgi?id=747191
src/vteseq.c | 29 ++++++++++++-----------------
1 files changed, 12 insertions(+), 17 deletions(-)
---
diff --git a/src/vteseq.c b/src/vteseq.c
index 1910612..80c4e65 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -287,25 +287,20 @@ _vte_terminal_home_cursor (VteTerminal *terminal)
static void
_vte_terminal_clear_screen (VteTerminal *terminal)
{
- long i;
- VteRowData *rowdata;
+ long i, initial, row;
VteScreen *screen;
screen = terminal->pvt->screen;
-
- for (i = 0; i < terminal->pvt->row_count; i++) {
- /* If the row is actually on the screen, clear data in the row. */
- if (_vte_ring_next(screen->row_data) > screen->insert_delta + i) {
- /* Get the data for the row. */
- rowdata = _vte_ring_index_writable (screen->row_data, screen->insert_delta + i);
- g_assert(rowdata != NULL);
- /* Remove it. */
- _vte_row_data_shrink (rowdata, 0);
- /* Add enough cells to the end of the line to fill out the row. */
- _vte_row_data_fill (rowdata, &terminal->pvt->fill_defaults,
terminal->pvt->column_count);
- rowdata->attr.soft_wrapped = 0;
- }
- }
-
+ initial = screen->insert_delta;
+ row = terminal->pvt->cursor.row - screen->insert_delta;
+ initial = _vte_ring_next(screen->row_data);
+ /* Add a new screen's worth of rows. */
+ for (i = 0; i < terminal->pvt->row_count; i++)
+ _vte_terminal_ring_append (terminal, TRUE);
+ /* Move the cursor and insertion delta to the first line in the
+ * newly-cleared area and scroll if need be. */
+ screen->insert_delta = initial;
+ terminal->pvt->cursor.row = row + screen->insert_delta;
+ _vte_terminal_adjust_adjustments(terminal);
/* Redraw everything. */
_vte_invalidate_all(terminal);
/* We've modified the display. Make a note of it. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]