[vte/vte-next: 34/47] Remove sealed {row, column}_count from public struct
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next: 34/47] Remove sealed {row, column}_count from public struct
- Date: Tue, 3 May 2011 00:07:49 +0000 (UTC)
commit 2f804e336733f821dc652a8ed1f1eb21527a2c58
Author: Christian Persch <chpe gnome org>
Date: Mon May 2 22:38:56 2011 +0200
Remove sealed {row,column}_count from public struct
src/vte-private.h | 4 +
src/vte.c | 218 ++++++++++++++++++++++++++--------------------------
src/vte.h | 3 -
src/vteaccess.c | 13 ++--
src/vteapp.c | 8 +-
src/vteseq.c | 88 +++++++++++-----------
6 files changed, 168 insertions(+), 166 deletions(-)
---
diff --git a/src/vte-private.h b/src/vte-private.h
index 52d1dc3..cf8be4a 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -140,6 +140,10 @@ typedef struct _VteVisualPosition {
/* Terminal private data. */
struct _VteTerminalPrivate {
+ /* Metric and sizing data: dimensions of the window */
+ glong row_count;
+ glong column_count;
+
/* Emulation setup data. */
struct _vte_termcap *termcap; /* termcap storage */
struct _vte_matcher *matcher; /* control sequence matcher */
diff --git a/src/vte.c b/src/vte.c
index c57ec19..78ec65e 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -304,11 +304,11 @@ _vte_terminal_ring_insert (VteTerminal *terminal, glong position, gboolean fill)
VteRing *ring = terminal->pvt->screen->row_data;
while (G_UNLIKELY (_vte_ring_next (ring) < position)) {
row = _vte_ring_append (ring);
- _vte_row_data_fill (row, &terminal->pvt->screen->fill_defaults, terminal->column_count);
+ _vte_row_data_fill (row, &terminal->pvt->screen->fill_defaults, terminal->pvt->column_count);
}
row = _vte_ring_insert (ring, position);
if (fill)
- _vte_row_data_fill (row, &terminal->pvt->screen->fill_defaults, terminal->column_count);
+ _vte_row_data_fill (row, &terminal->pvt->screen->fill_defaults, terminal->pvt->column_count);
return row;
}
@@ -368,25 +368,25 @@ _vte_invalidate_cells(VteTerminal *terminal,
row_start -= terminal->pvt->screen->scroll_delta;
/* Ensure the start of region is on screen */
- if (column_start > terminal->column_count ||
- row_start > terminal->row_count) {
+ if (column_start > terminal->pvt->column_count ||
+ row_start > terminal->pvt->row_count) {
return;
}
/* Clamp the start values to reasonable numbers. */
i = row_start + row_count;
row_start = MAX (0, row_start);
- row_count = CLAMP (i - row_start, 0, terminal->row_count);
+ row_count = CLAMP (i - row_start, 0, terminal->pvt->row_count);
i = column_start + column_count;
column_start = MAX (0, column_start);
- column_count = CLAMP (i - column_start, 0 , terminal->column_count);
+ column_count = CLAMP (i - column_start, 0 , terminal->pvt->column_count);
if (!column_count || !row_count) {
return;
}
- if (column_count == terminal->column_count &&
- row_count == terminal->row_count) {
+ if (column_count == terminal->pvt->column_count &&
+ row_count == terminal->pvt->row_count) {
_vte_invalidate_all (terminal);
return;
}
@@ -400,7 +400,7 @@ _vte_invalidate_cells(VteTerminal *terminal,
rect.x += terminal->pvt->inner_border.left;
}
rect.width = (column_start + column_count) * terminal->pvt->char_width + 3 + terminal->pvt->inner_border.left;
- if (column_start + column_count == terminal->column_count) {
+ if (column_start + column_count == terminal->pvt->column_count) {
rect.width += terminal->pvt->inner_border.right;
}
rect.width -= rect.x;
@@ -410,7 +410,7 @@ _vte_invalidate_cells(VteTerminal *terminal,
rect.y += terminal->pvt->inner_border.top;
}
rect.height = (row_start + row_count) * terminal->pvt->char_height + 2 + terminal->pvt->inner_border.top;
- if (row_start + row_count == terminal->row_count) {
+ if (row_start + row_count == terminal->pvt->row_count) {
rect.height += terminal->pvt->inner_border.bottom;
}
rect.height -= rect.y;
@@ -446,10 +446,10 @@ _vte_invalidate_region (VteTerminal *terminal,
} else {
_vte_invalidate_cells(terminal,
scolumn,
- terminal->column_count - scolumn,
+ terminal->pvt->column_count - scolumn,
srow, 1);
_vte_invalidate_cells(terminal,
- 0, terminal->column_count,
+ 0, terminal->pvt->column_count,
srow + 1, erow - srow - 1);
_vte_invalidate_cells(terminal,
0, ecolumn + 1,
@@ -508,14 +508,14 @@ _vte_terminal_scroll_region (VteTerminal *terminal,
return;
}
- if (terminal->pvt->scroll_background || count >= terminal->row_count) {
+ if (terminal->pvt->scroll_background || count >= terminal->pvt->row_count) {
/* We have to repaint the entire window. */
_vte_invalidate_all(terminal);
} else {
/* We have to repaint the area which is to be
* scrolled. */
_vte_invalidate_cells(terminal,
- 0, terminal->column_count,
+ 0, terminal->pvt->column_count,
row, count);
}
}
@@ -589,7 +589,7 @@ find_end_column (VteTerminal *terminal, glong col, glong row)
columns = cell->attr.columns - 1;
}
}
- return MIN(col + columns, terminal->column_count);
+ return MIN(col + columns, terminal->pvt->column_count);
}
@@ -1773,7 +1773,7 @@ vte_terminal_queue_adjustment_value_changed_clamped(VteTerminal *terminal, glong
lower = gtk_adjustment_get_lower(terminal->adjustment);
upper = gtk_adjustment_get_upper(terminal->adjustment);
- v = CLAMP(v, lower, MAX (lower, upper - terminal->row_count));
+ v = CLAMP(v, lower, MAX (lower, upper - terminal->pvt->row_count));
vte_terminal_queue_adjustment_value_changed (terminal, v);
}
@@ -1826,7 +1826,7 @@ _vte_terminal_adjust_adjustments_full (VteTerminal *terminal)
if (v != 1) {
_vte_debug_print(VTE_DEBUG_ADJ,
"Changing step increment from %.0lf to %ld\n",
- v, terminal->row_count);
+ v, terminal->pvt->row_count);
gtk_adjustment_set_step_increment(terminal->adjustment, 1);
changed = TRUE;
}
@@ -1834,25 +1834,25 @@ _vte_terminal_adjust_adjustments_full (VteTerminal *terminal)
/* Set the number of rows the user sees to the number of rows the
* user sees. */
v = gtk_adjustment_get_page_size(terminal->adjustment);
- if (v != terminal->row_count) {
+ if (v != terminal->pvt->row_count) {
_vte_debug_print(VTE_DEBUG_ADJ,
"Changing page size from %.0f to %ld\n",
- v, terminal->row_count);
+ v, terminal->pvt->row_count);
gtk_adjustment_set_page_size(terminal->adjustment,
- terminal->row_count);
+ terminal->pvt->row_count);
changed = TRUE;
}
/* Clicking in the empty area should scroll one screen, so set the
* page size to the number of visible rows. */
v = gtk_adjustment_get_page_increment(terminal->adjustment);
- if (v != terminal->row_count) {
+ if (v != terminal->pvt->row_count) {
_vte_debug_print(VTE_DEBUG_ADJ,
"Changing page increment from "
"%.0f to %ld\n",
- v, terminal->row_count);
+ v, terminal->pvt->row_count);
gtk_adjustment_set_page_increment(terminal->adjustment,
- terminal->row_count);
+ terminal->pvt->row_count);
changed = TRUE;
}
@@ -1880,7 +1880,7 @@ vte_terminal_scroll_lines(VteTerminal *terminal, gint lines)
static void
vte_terminal_scroll_pages(VteTerminal *terminal, gint pages)
{
- vte_terminal_scroll_lines(terminal, pages * terminal->row_count);
+ vte_terminal_scroll_lines(terminal, pages * terminal->pvt->row_count);
}
/* Scroll so that the scroll delta is the minimum value. */
@@ -2098,9 +2098,9 @@ _vte_terminal_update_insert_delta(VteTerminal *terminal)
* the buffer (even if it's empty). This usually causes the
* top row to become a history-only row. */
delta = screen->insert_delta;
- delta = MIN(delta, rows - terminal->row_count);
+ delta = MIN(delta, rows - terminal->pvt->row_count);
delta = MAX(delta,
- screen->cursor_current.row - (terminal->row_count - 1));
+ screen->cursor_current.row - (terminal->pvt->row_count - 1));
delta = MAX(delta, _vte_ring_delta(screen->row_data));
/* Adjust the insert delta and scroll if needed. */
@@ -2820,14 +2820,14 @@ _vte_terminal_cursor_down (VteTerminal *terminal)
end = screen->insert_delta + screen->scrolling_region.end;
} else {
start = screen->insert_delta;
- end = start + terminal->row_count - 1;
+ end = start + terminal->pvt->row_count - 1;
}
if (screen->cursor_current.row == end) {
/* Match xterm and fill to the end of row when scrolling. */
if (screen->fill_defaults.attr.back != VTE_DEF_BG) {
VteRowData *rowdata;
rowdata = _vte_terminal_ensure_row (terminal);
- _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->column_count);
+ _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->pvt->column_count);
}
if (screen->scrolling_restricted) {
@@ -2859,7 +2859,7 @@ _vte_terminal_cursor_down (VteTerminal *terminal)
_vte_terminal_scroll_region(terminal, start,
end - start + 1, -1);
_vte_invalidate_cells(terminal,
- 0, terminal->column_count,
+ 0, terminal->pvt->column_count,
end - 2, 2);
}
} else {
@@ -2872,7 +2872,7 @@ _vte_terminal_cursor_down (VteTerminal *terminal)
if (screen->fill_defaults.attr.back != VTE_DEF_BG) {
VteRowData *rowdata;
rowdata = _vte_terminal_ensure_row (terminal);
- _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->column_count);
+ _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->pvt->column_count);
}
} else {
/* Otherwise, just move the cursor down. */
@@ -2924,7 +2924,7 @@ _vte_terminal_insert_char(VteTerminal *terminal, gunichar c,
/* If we're autowrapping here, do it. */
col = screen->cursor_current.col;
- if (G_UNLIKELY (columns && col + columns > terminal->column_count)) {
+ if (G_UNLIKELY (columns && col + columns > terminal->pvt->column_count)) {
if (terminal->pvt->flags.am) {
_vte_debug_print(VTE_DEBUG_ADJ,
"Autowrapping before character\n");
@@ -2938,7 +2938,7 @@ _vte_terminal_insert_char(VteTerminal *terminal, gunichar c,
} else {
/* Don't wrap, stay at the rightmost column. */
col = screen->cursor_current.col =
- terminal->column_count - columns;
+ terminal->pvt->column_count - columns;
}
line_wrapped = TRUE;
}
@@ -3083,20 +3083,20 @@ _vte_terminal_insert_char(VteTerminal *terminal, gunichar c,
pcell->attr = attr;
col++;
}
- _vte_row_data_shrink (row, terminal->column_count);
+ _vte_row_data_shrink (row, terminal->pvt->column_count);
/* Signal that this part of the window needs drawing. */
if (G_UNLIKELY (invalidate_now)) {
_vte_invalidate_cells(terminal,
col - columns,
- insert ? terminal->column_count : columns,
+ insert ? terminal->pvt->column_count : columns,
screen->cursor_current.row, 1);
}
/* If we're autowrapping *here*, do it. */
screen->cursor_current.col = col;
- if (G_UNLIKELY (col >= terminal->column_count)) {
+ if (G_UNLIKELY (col >= terminal->pvt->column_count)) {
if (terminal->pvt->flags.am && !terminal->pvt->flags.xn) {
/* Wrap. */
screen->cursor_current.col = 0;
@@ -3671,10 +3671,10 @@ skip_chunk:
bbox_topleft.x = MAX(bbox_topleft.x, 0);
bbox_topleft.y = MAX(bbox_topleft.y, delta);
bbox_bottomright.x = MIN(bbox_bottomright.x,
- terminal->column_count);
+ terminal->pvt->column_count);
/* lazily apply the +1 to the cursor_row */
bbox_bottomright.y = MIN(bbox_bottomright.y + 1,
- delta + terminal->row_count);
+ delta + terminal->pvt->row_count);
_vte_invalidate_cells(terminal,
bbox_topleft.x,
@@ -3764,10 +3764,10 @@ skip_chunk:
bbox_topleft.x = MAX(bbox_topleft.x, 0);
bbox_topleft.y = MAX(bbox_topleft.y, delta);
bbox_bottomright.x = MIN(bbox_bottomright.x,
- terminal->column_count);
+ terminal->pvt->column_count);
/* lazily apply the +1 to the cursor_row */
bbox_bottomright.y = MIN(bbox_bottomright.y + 1,
- delta + terminal->row_count);
+ delta + terminal->pvt->row_count);
_vte_invalidate_cells(terminal,
bbox_topleft.x,
@@ -3859,7 +3859,7 @@ next_match:
terminal->pvt->selection_start.row,
0,
terminal->pvt->selection_end.row,
- terminal->column_count,
+ terminal->pvt->column_count,
vte_cell_is_selected,
NULL,
NULL);
@@ -3883,10 +3883,10 @@ next_match:
bbox_topleft.x = MAX(bbox_topleft.x, 0);
bbox_topleft.y = MAX(bbox_topleft.y, delta);
bbox_bottomright.x = MIN(bbox_bottomright.x,
- terminal->column_count);
+ terminal->pvt->column_count);
/* lazily apply the +1 to the cursor_row */
bbox_bottomright.y = MIN(bbox_bottomright.y + 1,
- delta + terminal->row_count);
+ delta + terminal->pvt->row_count);
_vte_invalidate_cells(terminal,
bbox_topleft.x,
@@ -4688,7 +4688,7 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
if (terminal->pvt->margin_bell) {
if ((terminal->pvt->screen->cursor_current.col +
(glong) terminal->pvt->bell_margin) ==
- terminal->column_count) {
+ terminal->pvt->column_count) {
_vte_terminal_beep (terminal);
}
}
@@ -5329,9 +5329,9 @@ vte_terminal_get_mouse_tracking_info (VteTerminal *terminal,
/* Encode the cursor coordinates. */
cx = 32 + CLAMP(1 + col,
- 1, terminal->column_count);
+ 1, terminal->pvt->column_count);
cy = 32 + CLAMP(1 + row,
- 1, terminal->row_count);;
+ 1, terminal->pvt->row_count);;
*pb = cb;
*px = cx;
@@ -5847,7 +5847,7 @@ vte_terminal_get_text_range_maybe_wrapped(VteTerminal *terminal,
}
/* Adjust column, in case we want to append a newline */
- attr.column = MAX(terminal->column_count, attr.column + 1);
+ attr.column = MAX(terminal->pvt->column_count, attr.column + 1);
/* Add a newline in block mode. */
if (terminal->pvt->selection_block_mode) {
@@ -5855,7 +5855,7 @@ vte_terminal_get_text_range_maybe_wrapped(VteTerminal *terminal,
}
/* Else, if the last visible column on this line was selected and
* not soft-wrapped, append a newline. */
- else if (is_selected(terminal, terminal->column_count, row, data)) {
+ else if (is_selected(terminal, terminal->pvt->column_count, row, data)) {
/* If we didn't softwrap, add a newline. */
/* XXX need to clear row->soft_wrap on deletion! */
if (!vte_line_is_wrappable(terminal, row)) {
@@ -5884,8 +5884,8 @@ vte_terminal_get_text_maybe_wrapped(VteTerminal *terminal,
long start_row, start_col, end_row, end_col;
start_row = terminal->pvt->screen->scroll_delta;
start_col = 0;
- end_row = start_row + terminal->row_count - 1;
- end_col = terminal->column_count - 1;
+ end_row = start_row + terminal->pvt->row_count - 1;
+ end_col = terminal->pvt->column_count - 1;
return vte_terminal_get_text_range_maybe_wrapped(terminal,
start_row, start_col,
end_row, end_col,
@@ -6008,7 +6008,7 @@ vte_terminal_copy(VteTerminal *terminal, GdkAtom board)
terminal->pvt->selection_start.row,
0,
terminal->pvt->selection_end.row,
- terminal->column_count,
+ terminal->pvt->column_count,
vte_cell_is_selected,
NULL,
NULL);
@@ -6207,14 +6207,14 @@ vte_terminal_extend_selection_expand (VteTerminal *terminal)
* endpoint as far right as we can expect. */
if (ec->col >= i) {
ec->col = MAX(ec->col,
- MAX(terminal->column_count,
+ MAX(terminal->pvt->column_count,
(long) _vte_row_data_length (rowdata)));
}
} else {
/* Snap to the rightmost column, only if selecting anything of
* this row. */
if (ec->col >= 0)
- ec->col = MAX(ec->col, terminal->column_count);
+ ec->col = MAX(ec->col, terminal->pvt->column_count);
}
ec->col = find_end_column (terminal, ec->col, ec->row);
@@ -6238,7 +6238,7 @@ vte_terminal_extend_selection_expand (VteTerminal *terminal)
/* Back up. */
for (i = (j == sc->row) ?
sc->col :
- terminal->column_count;
+ terminal->pvt->column_count;
i > 0;
i--) {
if (vte_same_class(terminal,
@@ -6258,13 +6258,13 @@ vte_terminal_extend_selection_expand (VteTerminal *terminal)
} else {
if (vte_line_is_wrappable(terminal, j - 1) &&
vte_same_class(terminal,
- terminal->column_count - 1,
+ terminal->pvt->column_count - 1,
j - 1,
0,
j)) {
/* Move on to the previous line. */
j--;
- sc->col = terminal->column_count - 1;
+ sc->col = terminal->pvt->column_count - 1;
sc->row = j;
} else {
break;
@@ -6285,7 +6285,7 @@ vte_terminal_extend_selection_expand (VteTerminal *terminal)
for (i = (j == ec->row) ?
ec->col :
0;
- i < terminal->column_count - 1;
+ i < terminal->pvt->column_count - 1;
i++) {
if (vte_same_class(terminal,
i,
@@ -6298,13 +6298,13 @@ vte_terminal_extend_selection_expand (VteTerminal *terminal)
break;
}
}
- if (i < terminal->column_count - 1) {
+ if (i < terminal->pvt->column_count - 1) {
/* We hit a stopping point, so stop. */
break;
} else {
if (vte_line_is_wrappable(terminal, j) &&
vte_same_class(terminal,
- terminal->column_count - 1,
+ terminal->pvt->column_count - 1,
j,
0,
j + 1)) {
@@ -6336,7 +6336,7 @@ vte_terminal_extend_selection_expand (VteTerminal *terminal)
ec->row = j;
}
/* Make sure we include all of the last line. */
- ec->col = terminal->column_count;
+ ec->col = terminal->pvt->column_count;
if (_vte_ring_contains (screen->row_data, ec->row)) {
rowdata = _vte_ring_index(screen->row_data, ec->row);
if (rowdata != NULL) {
@@ -6368,12 +6368,12 @@ vte_terminal_extend_selection(VteTerminal *terminal, long x, long y,
y = 0;
if (!terminal->pvt->selection_block_mode)
x = 0;
- } else if (y >= terminal->row_count * height) {
+ } else if (y >= terminal->pvt->row_count * height) {
if (!terminal->pvt->selection_block_mode) {
- y = terminal->row_count * height;
+ y = terminal->pvt->row_count * height;
x = -1;
} else {
- y = terminal->row_count * height - 1;
+ y = terminal->pvt->row_count * height - 1;
}
}
@@ -6660,7 +6660,7 @@ vte_terminal_autoscroll(VteTerminal *terminal)
_vte_debug_print(VTE_DEBUG_EVENTS, "Autoscrolling down.\n");
}
if (terminal->pvt->mouse_last_y >=
- terminal->row_count * terminal->pvt->char_height) {
+ terminal->pvt->row_count * terminal->pvt->char_height) {
if (terminal->adjustment) {
/* Try to scroll up by one line. */
adj = terminal->pvt->screen->scroll_delta + 1;
@@ -6671,8 +6671,8 @@ vte_terminal_autoscroll(VteTerminal *terminal)
}
if (extend) {
/* Don't select off-screen areas. That just confuses people. */
- xmax = terminal->column_count * terminal->pvt->char_width;
- ymax = terminal->row_count * terminal->pvt->char_height;
+ xmax = terminal->pvt->column_count * terminal->pvt->char_width;
+ ymax = terminal->pvt->row_count * terminal->pvt->char_height;
x = CLAMP(terminal->pvt->mouse_last_x, 0, xmax);
y = CLAMP(terminal->pvt->mouse_last_y, 0, ymax);
@@ -6682,7 +6682,7 @@ vte_terminal_autoscroll(VteTerminal *terminal)
x = 0;
}
if (terminal->pvt->mouse_last_y >= ymax && !terminal->pvt->selection_block_mode) {
- x = terminal->column_count * terminal->pvt->char_width;
+ x = terminal->pvt->column_count * terminal->pvt->char_width;
}
/* Extend selection to cover the newly-scrolled area. */
vte_terminal_extend_selection(terminal, x, y, FALSE, TRUE);
@@ -6700,7 +6700,7 @@ vte_terminal_start_autoscroll(VteTerminal *terminal)
if (terminal->pvt->mouse_autoscroll_tag == 0) {
terminal->pvt->mouse_autoscroll_tag =
g_timeout_add_full(G_PRIORITY_LOW,
- 666 / terminal->row_count,
+ 666 / terminal->pvt->row_count,
(GSourceFunc)vte_terminal_autoscroll,
terminal,
NULL);
@@ -6765,7 +6765,7 @@ vte_terminal_motion_notify(GtkWidget *widget, GdkEventMotion *event)
/* Start scrolling if we need to. */
if (event->y < terminal->pvt->inner_border.top ||
- event->y >= terminal->row_count * height +
+ event->y >= terminal->pvt->row_count * height +
terminal->pvt->inner_border.top)
{
/* Give mouse wigglers something. */
@@ -7372,8 +7372,8 @@ vte_terminal_refresh_size(VteTerminal *terminal)
return;
if (vte_pty_get_size(pvt->pty, &rows, &columns, &error)) {
- terminal->row_count = rows;
- terminal->column_count = columns;
+ terminal->pvt->row_count = rows;
+ terminal->pvt->column_count = columns;
} else {
g_warning(_("Error reading PTY size, using defaults: %s\n"), error->message);
g_error_free(error);
@@ -7400,8 +7400,8 @@ vte_terminal_set_size(VteTerminal *terminal, glong columns, glong rows)
"Setting PTY size to %ldx%ld.\n",
columns, rows);
- old_rows = terminal->row_count;
- old_columns = terminal->column_count;
+ old_rows = terminal->pvt->row_count;
+ old_columns = terminal->pvt->column_count;
if (terminal->pvt->pty != NULL) {
GError *error = NULL;
@@ -7415,14 +7415,14 @@ vte_terminal_set_size(VteTerminal *terminal, glong columns, glong rows)
}
vte_terminal_refresh_size(terminal);
} else {
- terminal->row_count = rows;
- terminal->column_count = columns;
+ terminal->pvt->row_count = rows;
+ terminal->pvt->column_count = columns;
}
- if (old_rows != terminal->row_count || old_columns != terminal->column_count) {
+ if (old_rows != terminal->pvt->row_count || old_columns != terminal->pvt->column_count) {
VteScreen *screen = terminal->pvt->screen;
glong visible_rows = MIN (old_rows, _vte_ring_length (screen->row_data));
- if (terminal->row_count < visible_rows) {
- glong delta = visible_rows - terminal->row_count;
+ if (terminal->pvt->row_count < visible_rows) {
+ glong delta = visible_rows - terminal->pvt->row_count;
screen->insert_delta += delta;
vte_terminal_queue_adjustment_value_changed (
terminal,
@@ -7458,7 +7458,7 @@ vte_terminal_handle_scroll(VteTerminal *terminal)
_vte_debug_print(VTE_DEBUG_ADJ,
"Scrolling by %ld\n", dy);
_vte_terminal_scroll_region(terminal, screen->scroll_delta,
- terminal->row_count, -dy);
+ terminal->pvt->row_count, -dy);
vte_terminal_emit_text_scrolled(terminal, dy);
_vte_terminal_queue_contents_changed(terminal);
} else {
@@ -7748,7 +7748,7 @@ vte_terminal_init(VteTerminal *terminal)
/* We allocated zeroed memory, just fill in non-zero stuff. */
/* Initialize the screens and histories. */
- _vte_ring_init (pvt->alternate_screen.row_data, terminal->row_count);
+ _vte_ring_init (pvt->alternate_screen.row_data, terminal->pvt->row_count);
pvt->alternate_screen.sendrecv_mode = TRUE;
pvt->alternate_screen.status_line_contents = g_string_new(NULL);
pvt->screen = &terminal->pvt->alternate_screen;
@@ -7879,7 +7879,7 @@ vte_terminal_get_preferred_width(GtkWidget *widget,
vte_terminal_refresh_size(terminal);
*minimum_width = terminal->pvt->char_width * 1;
- *natural_width = terminal->pvt->char_width * terminal->column_count;
+ *natural_width = terminal->pvt->char_width * terminal->pvt->column_count;
*minimum_width += terminal->pvt->inner_border.left +
terminal->pvt->inner_border.right;
@@ -7890,8 +7890,8 @@ vte_terminal_get_preferred_width(GtkWidget *widget,
"[Terminal %p] minimum_width=%d, natural_width=%d for %ldx%ld cells.\n",
terminal,
*minimum_width, *natural_width,
- terminal->column_count,
- terminal->row_count);
+ terminal->pvt->column_count,
+ terminal->pvt->row_count);
}
static void
@@ -7909,7 +7909,7 @@ vte_terminal_get_preferred_height(GtkWidget *widget,
vte_terminal_refresh_size(terminal);
*minimum_height = terminal->pvt->char_height * 1;
- *natural_height = terminal->pvt->char_height * terminal->row_count;
+ *natural_height = terminal->pvt->char_height * terminal->pvt->row_count;
*minimum_height += terminal->pvt->inner_border.left +
terminal->pvt->inner_border.right;
@@ -7920,8 +7920,8 @@ vte_terminal_get_preferred_height(GtkWidget *widget,
"[Terminal %p] minimum_height=%d, natural_height=%d for %ldx%ld cells.\n",
terminal,
*minimum_height, *natural_height,
- terminal->column_count,
- terminal->row_count);
+ terminal->pvt->column_count,
+ terminal->pvt->row_count);
}
/* Accept a given size from GTK+. */
@@ -7960,8 +7960,8 @@ vte_terminal_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
/* Set our allocation to match the structure. */
gtk_widget_set_allocation (widget, allocation);
- if (width != terminal->column_count
- || height != terminal->row_count
+ if (width != terminal->pvt->column_count
+ || height != terminal->pvt->row_count
|| update_scrollback)
{
VteScreen *screen = terminal->pvt->screen;
@@ -7974,10 +7974,10 @@ vte_terminal_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
if (screen->scrolling_restricted) {
screen->scrolling_region.start =
MIN(screen->scrolling_region.start,
- terminal->row_count - 1);
+ terminal->pvt->row_count - 1);
screen->scrolling_region.end =
MIN(screen->scrolling_region.end,
- terminal->row_count - 1);
+ terminal->pvt->row_count - 1);
}
/* Ensure scrollback buffers cover the screen. */
@@ -10168,13 +10168,13 @@ vte_terminal_expand_region (VteTerminal *terminal, cairo_region_t *region, const
* inclusion of neighbouring cells */
row = MAX(0, (area->y - terminal->pvt->inner_border.top - 1) / height);
row_stop = MIN(howmany(area->height + area->y - terminal->pvt->inner_border.top + 1, height),
- terminal->row_count);
+ terminal->pvt->row_count);
if (row_stop <= row) {
return;
}
col = MAX(0, (area->x - terminal->pvt->inner_border.left - 1) / width);
col_stop = MIN(howmany(area->width + area->x - terminal->pvt->inner_border.left + 1, width),
- terminal->column_count);
+ terminal->pvt->column_count);
if (col_stop <= col) {
return;
}
@@ -10212,13 +10212,13 @@ vte_terminal_paint_area (VteTerminal *terminal, const cairo_rectangle_int_t *are
row = MAX(0, (area->y - terminal->pvt->inner_border.top) / height);
row_stop = MIN((area->height + area->y - terminal->pvt->inner_border.top) / height,
- terminal->row_count);
+ terminal->pvt->row_count);
if (row_stop <= row) {
return;
}
col = MAX(0, (area->x - terminal->pvt->inner_border.left) / width);
col_stop = MIN((area->width + area->x - terminal->pvt->inner_border.left) / width,
- terminal->column_count);
+ terminal->pvt->column_count);
if (col_stop <= col) {
return;
}
@@ -10270,8 +10270,8 @@ vte_terminal_paint_cursor(VteTerminal *terminal)
width = terminal->pvt->char_width;
height = terminal->pvt->char_height;
- if ((CLAMP(col, 0, terminal->column_count - 1) != col) ||
- (CLAMP(row, 0, terminal->row_count - 1) != row))
+ if ((CLAMP(col, 0, terminal->pvt->column_count - 1) != col) ||
+ (CLAMP(row, 0, terminal->pvt->row_count - 1) != row))
return;
focus = terminal->pvt->has_focus;
@@ -10421,8 +10421,8 @@ vte_terminal_paint_im_preedit_string(VteTerminal *terminal)
/* If the pre-edit string won't fit on the screen if we start
* drawing it at the cursor's position, move it left. */
col = screen->cursor_current.col;
- if (col + columns > terminal->column_count) {
- col = MAX(0, terminal->column_count - columns);
+ if (col + columns > terminal->pvt->column_count) {
+ col = MAX(0, terminal->pvt->column_count - columns);
}
/* Draw the preedit string, boxed. */
@@ -12858,24 +12858,24 @@ vte_terminal_set_scrollback_lines(VteTerminal *terminal, glong lines)
if (screen == &terminal->pvt->normal_screen) {
glong low, high, next;
/* We need at least as many lines as are visible */
- lines = MAX (lines, terminal->row_count);
+ lines = MAX (lines, terminal->pvt->row_count);
next = MAX (screen->cursor_current.row + 1,
_vte_ring_next (screen->row_data));
_vte_ring_resize (screen->row_data, lines);
low = _vte_ring_delta (screen->row_data);
- high = lines + MIN (G_MAXLONG - lines, low - terminal->row_count + 1);
+ high = lines + MIN (G_MAXLONG - lines, low - terminal->pvt->row_count + 1);
screen->insert_delta = CLAMP (screen->insert_delta, low, high);
scroll_delta = CLAMP (scroll_delta, low, screen->insert_delta);
- next = MIN (next, screen->insert_delta + terminal->row_count);
+ next = MIN (next, screen->insert_delta + terminal->pvt->row_count);
if (_vte_ring_next (screen->row_data) > next){
_vte_ring_shrink (screen->row_data, next - low);
}
} else {
- _vte_ring_resize (screen->row_data, terminal->row_count);
+ _vte_ring_resize (screen->row_data, terminal->pvt->row_count);
scroll_delta = _vte_ring_delta (screen->row_data);
screen->insert_delta = _vte_ring_delta (screen->row_data);
- if (_vte_ring_next (screen->row_data) > screen->insert_delta + terminal->row_count){
- _vte_ring_shrink (screen->row_data, terminal->row_count);
+ if (_vte_ring_next (screen->row_data) > screen->insert_delta + terminal->pvt->row_count){
+ _vte_ring_shrink (screen->row_data, terminal->pvt->row_count);
}
}
@@ -13158,7 +13158,7 @@ vte_terminal_reset(VteTerminal *terminal,
_vte_ring_fini(pvt->normal_screen.row_data);
_vte_ring_init(pvt->normal_screen.row_data, pvt->scrollback_lines);
_vte_ring_fini(pvt->alternate_screen.row_data);
- _vte_ring_init(pvt->alternate_screen.row_data, terminal->row_count);
+ _vte_ring_init(pvt->alternate_screen.row_data, terminal->pvt->row_count);
pvt->normal_screen.cursor_saved.row = 0;
pvt->normal_screen.cursor_saved.col = 0;
pvt->normal_screen.cursor_current.row = 0;
@@ -13302,7 +13302,7 @@ glong
vte_terminal_get_row_count(VteTerminal *terminal)
{
g_return_val_if_fail(VTE_IS_TERMINAL(terminal), -1);
- return terminal->row_count;
+ return terminal->pvt->row_count;
}
/**
@@ -13315,7 +13315,7 @@ glong
vte_terminal_get_column_count(VteTerminal *terminal)
{
g_return_val_if_fail(VTE_IS_TERMINAL(terminal), -1);
- return terminal->column_count;
+ return terminal->pvt->column_count;
}
/**
@@ -13424,8 +13424,8 @@ vte_terminal_set_pty_object(VteTerminal *terminal,
}
vte_terminal_set_size(terminal,
- terminal->column_count,
- terminal->row_count);
+ terminal->pvt->column_count,
+ terminal->pvt->row_count);
_vte_terminal_setup_utf8 (terminal);
@@ -14337,7 +14337,7 @@ vte_terminal_search_find (VteTerminal *terminal,
last_start_row = pvt->selection_start.row;
last_end_row = pvt->selection_end.row + 1;
} else {
- last_start_row = pvt->screen->scroll_delta + terminal->row_count;
+ last_start_row = pvt->screen->scroll_delta + terminal->pvt->row_count;
last_end_row = pvt->screen->scroll_delta;
}
last_start_row = MAX (buffer_start_row, last_start_row);
diff --git a/src/vte.h b/src/vte.h
index 345d38c..be4ccac 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -68,9 +68,6 @@ struct _VteTerminal {
/*< private >*/
GtkAdjustment *_VTE_SEAL(adjustment); /* Scrolling adjustment. */
- /* Metric and sizing data. */
- glong _VTE_SEAL(row_count), _VTE_SEAL(column_count); /* dimensions of the window */
-
/* Titles. */
char *_VTE_SEAL(window_title);
char *_VTE_SEAL(icon_title);
diff --git a/src/vteaccess.c b/src/vteaccess.c
index 59bcc3a..f06d588 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -535,7 +535,7 @@ vte_terminal_accessible_text_scrolled(VteTerminal *terminal,
{
VteTerminalAccessiblePrivate *priv;
struct _VteCharAttributes attr;
- long delta;
+ long delta, row_count;
guint i, len;
g_assert(VTE_IS_TERMINAL_ACCESSIBLE(data));
@@ -545,8 +545,9 @@ vte_terminal_accessible_text_scrolled(VteTerminal *terminal,
VTE_TERMINAL_ACCESSIBLE_PRIVATE_DATA);
g_assert(priv != NULL);
- if (((howmuch < 0) && (howmuch <= -terminal->row_count)) ||
- ((howmuch > 0) && (howmuch >= terminal->row_count))) {
+ row_count = vte_terminal_get_row_count(terminal);
+ if (((howmuch < 0) && (howmuch <= -row_count)) ||
+ ((howmuch > 0) && (howmuch >= row_count))) {
/* All of the text was removed. */
if (priv->snapshot_text != NULL) {
if (priv->snapshot_text->str != NULL) {
@@ -583,7 +584,7 @@ vte_terminal_accessible_text_scrolled(VteTerminal *terminal,
}
/* We scrolled up, so text was added at the top and removed
* from the bottom. */
- if ((howmuch < 0) && (howmuch > -terminal->row_count)) {
+ if ((howmuch < 0) && (howmuch > -row_count)) {
gboolean inserted = FALSE;
howmuch = -howmuch;
if (priv->snapshot_attributes != NULL &&
@@ -593,7 +594,7 @@ vte_terminal_accessible_text_scrolled(VteTerminal *terminal,
attr = g_array_index(priv->snapshot_attributes,
struct _VteCharAttributes,
i);
- if (attr.row >= delta + terminal->row_count - howmuch) {
+ if (attr.row >= delta + row_count - howmuch) {
break;
}
}
@@ -627,7 +628,7 @@ vte_terminal_accessible_text_scrolled(VteTerminal *terminal,
}
/* We scrolled down, so text was added at the bottom and removed
* from the top. */
- if ((howmuch > 0) && (howmuch < terminal->row_count)) {
+ if ((howmuch > 0) && (howmuch < row_count)) {
gboolean inserted = FALSE;
if (priv->snapshot_attributes != NULL &&
priv->snapshot_text != NULL) {
diff --git a/src/vteapp.c b/src/vteapp.c
index 622d4df..b220c48 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -358,15 +358,15 @@ adjust_font_size(GtkWidget *widget, gpointer data, gint howmuch)
/* Read the screen dimensions in cells. */
terminal = VTE_TERMINAL(widget);
- columns = terminal->column_count;
- rows = terminal->row_count;
+ columns = vte_terminal_get_column_count(terminal);
+ rows = vte_terminal_get_row_count(terminal);
/* Take into account padding and border overhead. */
gtk_window_get_size(GTK_WINDOW(data), &owidth, &oheight);
char_width = vte_terminal_get_char_width (terminal);
char_height = vte_terminal_get_char_height (terminal);
- owidth -= char_width * terminal->column_count;
- oheight -= char_height * terminal->row_count;
+ owidth -= char_width * columns;
+ oheight -= char_height * rows;
/* Calculate the new font size. */
desired = pango_font_description_copy(vte_terminal_get_font(terminal));
diff --git a/src/vteseq.c b/src/vteseq.c
index 5d76280..ce39eda 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -276,7 +276,7 @@ _vte_terminal_clear_screen (VteTerminal *terminal)
row = screen->cursor_current.row - screen->insert_delta;
initial = _vte_ring_next(screen->row_data);
/* Add a new screen's worth of rows. */
- for (i = 0; i < terminal->row_count; i++)
+ 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. */
@@ -307,11 +307,11 @@ _vte_terminal_clear_current_line (VteTerminal *terminal)
/* 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, &screen->fill_defaults, terminal->column_count);
+ _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->pvt->column_count);
rowdata->attr.soft_wrapped = 0;
/* Repaint this row. */
_vte_invalidate_cells(terminal,
- 0, terminal->column_count,
+ 0, terminal->pvt->column_count,
screen->cursor_current.row, 1);
}
@@ -337,11 +337,11 @@ _vte_terminal_clear_above_current (VteTerminal *terminal)
/* Remove it. */
_vte_row_data_shrink (rowdata, 0);
/* Add new cells until we fill the row. */
- _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->column_count);
+ _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->pvt->column_count);
rowdata->attr.soft_wrapped = 0;
/* Repaint the row. */
_vte_invalidate_cells(terminal,
- 0, terminal->column_count, i, 1);
+ 0, terminal->pvt->column_count, i, 1);
}
}
/* We've modified the display. Make a note of it. */
@@ -362,7 +362,7 @@ _vte_terminal_scroll_text (VteTerminal *terminal, int scroll_amount)
end = screen->insert_delta + screen->scrolling_region.end;
} else {
start = screen->insert_delta;
- end = start + terminal->row_count - 1;
+ end = start + terminal->pvt->row_count - 1;
}
while (_vte_ring_next(screen->row_data) <= end)
@@ -807,7 +807,7 @@ vte_sequence_handler_decset_internal(VteTerminal *terminal,
terminal->pvt->char_width +
terminal->pvt->inner_border.left +
terminal->pvt->inner_border.right,
- terminal->row_count *
+ terminal->pvt->row_count *
terminal->pvt->char_height +
terminal->pvt->inner_border.top +
terminal->pvt->inner_border.bottom);
@@ -913,7 +913,7 @@ vte_sequence_handler_al (VteTerminal *terminal, GValueArray *params)
if (screen->scrolling_restricted) {
end = screen->insert_delta + screen->scrolling_region.end;
} else {
- end = screen->insert_delta + terminal->row_count - 1;
+ end = screen->insert_delta + terminal->pvt->row_count - 1;
}
/* Extract any parameters. */
@@ -978,7 +978,7 @@ vte_sequence_handler_bt (VteTerminal *terminal, GValueArray *params)
while (newcol > 0) {
newcol--;
if (_vte_terminal_get_tabstop(terminal,
- newcol % terminal->column_count)) {
+ newcol % terminal->pvt->column_count)) {
break;
}
}
@@ -1055,7 +1055,7 @@ vte_sequence_handler_cd (VteTerminal *terminal, GValueArray *params)
}
/* Now fill the cleared areas. */
for (i = screen->cursor_current.row;
- i < screen->insert_delta + terminal->row_count;
+ i < screen->insert_delta + terminal->pvt->row_count;
i++) {
/* Retrieve the row's data, creating it if necessary. */
if (_vte_ring_contains (screen->row_data, i)) {
@@ -1065,11 +1065,11 @@ vte_sequence_handler_cd (VteTerminal *terminal, GValueArray *params)
rowdata = _vte_terminal_ring_append (terminal, FALSE);
}
/* Pad out the row. */
- _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->column_count);
+ _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->pvt->column_count);
rowdata->attr.soft_wrapped = 0;
/* Repaint this row. */
_vte_invalidate_cells(terminal,
- 0, terminal->column_count,
+ 0, terminal->pvt->column_count,
i, 1);
}
@@ -1097,13 +1097,13 @@ vte_sequence_handler_ce (VteTerminal *terminal, GValueArray *params)
}
if (screen->fill_defaults.attr.back != VTE_DEF_BG) {
/* Add enough cells to fill out the row. */
- _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->column_count);
+ _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->pvt->column_count);
}
rowdata->attr.soft_wrapped = 0;
/* Repaint this row. */
_vte_invalidate_cells(terminal,
screen->cursor_current.col,
- terminal->column_count -
+ terminal->pvt->column_count -
screen->cursor_current.col,
screen->cursor_current.row, 1);
}
@@ -1123,7 +1123,7 @@ vte_sequence_handler_ch (VteTerminal *terminal, GValueArray *params)
if (G_VALUE_HOLDS_LONG(value)) {
val = CLAMP(g_value_get_long(value),
0,
- terminal->column_count - 1);
+ terminal->pvt->column_count - 1);
/* Move the cursor. */
screen->cursor_current.col = val;
_vte_terminal_cleanup_tab_fragments_at_cursor (terminal);
@@ -1165,13 +1165,13 @@ vte_sequence_handler_cm (VteTerminal *terminal, GValueArray *params)
origin = 0;
}
rowval = g_value_get_long(row) + origin;
- rowval = CLAMP(rowval, 0, terminal->row_count - 1);
+ rowval = CLAMP(rowval, 0, terminal->pvt->row_count - 1);
}
if (params->n_values >= 2) {
col = g_value_array_get_nth(params, 1);
if (G_VALUE_HOLDS_LONG(col)) {
colval = g_value_get_long(col);
- colval = CLAMP(colval, 0, terminal->column_count - 1);
+ colval = CLAMP(colval, 0, terminal->pvt->column_count - 1);
}
}
}
@@ -1213,7 +1213,7 @@ vte_sequence_handler_cs (VteTerminal *terminal, GValueArray *params)
end = g_value_get_long(value);
}
/* Catch garbage. */
- rows = terminal->row_count;
+ rows = terminal->pvt->row_count;
if (start <= 0 || start >= rows) {
start = 0;
}
@@ -1236,7 +1236,7 @@ vte_sequence_handler_cs (VteTerminal *terminal, GValueArray *params)
static void
vte_sequence_handler_cS (VteTerminal *terminal, GValueArray *params)
{
- long start=0, end=terminal->row_count-1, rows;
+ long start=0, end=terminal->pvt->row_count-1, rows;
GValue *value;
VteScreen *screen;
@@ -1261,7 +1261,7 @@ vte_sequence_handler_cS (VteTerminal *terminal, GValueArray *params)
screen->scrolling_region.end = end;
screen->scrolling_restricted = TRUE;
/* Special case -- run wild, run free. */
- rows = terminal->row_count;
+ rows = terminal->pvt->row_count;
if ((screen->scrolling_region.start == 0) &&
(screen->scrolling_region.end == rows - 1)) {
screen->scrolling_restricted = FALSE;
@@ -1289,7 +1289,7 @@ vte_sequence_handler_cursor_lower_left (VteTerminal *terminal, GValueArray *para
VteScreen *screen;
long row;
screen = terminal->pvt->screen;
- row = MAX(0, terminal->row_count - 1);
+ row = MAX(0, terminal->pvt->row_count - 1);
screen->cursor_current.row = screen->insert_delta + row;
screen->cursor_current.col = 0;
}
@@ -1330,7 +1330,7 @@ vte_sequence_handler_cv (VteTerminal *terminal, GValueArray *params)
origin = 0;
}
val = g_value_get_long(value) + origin;
- val = CLAMP(val, 0, terminal->row_count - 1);
+ val = CLAMP(val, 0, terminal->pvt->row_count - 1);
screen->cursor_current.row = screen->insert_delta + val;
}
}
@@ -1357,8 +1357,8 @@ vte_sequence_handler_dc (VteTerminal *terminal, GValueArray *params)
if (col < len) {
_vte_row_data_remove (rowdata, col);
if (screen->fill_defaults.attr.back != VTE_DEF_BG) {
- _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->column_count);
- len = terminal->column_count;
+ _vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->pvt->column_count);
+ len = terminal->pvt->column_count;
}
/* Repaint this row. */
_vte_invalidate_cells(terminal,
@@ -1392,7 +1392,7 @@ vte_sequence_handler_dl (VteTerminal *terminal, GValueArray *params)
if (screen->scrolling_restricted) {
end = screen->insert_delta + screen->scrolling_region.end;
} else {
- end = screen->insert_delta + terminal->row_count - 1;
+ end = screen->insert_delta + terminal->pvt->row_count - 1;
}
/* Extract any parameters. */
@@ -1442,7 +1442,7 @@ vte_sequence_handler_do (VteTerminal *terminal, GValueArray *params)
end = screen->insert_delta + screen->scrolling_region.end;
} else {
start = screen->insert_delta;
- end = start + terminal->row_count - 1;
+ end = start + terminal->pvt->row_count - 1;
}
/* Move the cursor down. */
@@ -1624,7 +1624,7 @@ vte_sequence_handler_le (VteTerminal *terminal, GValueArray *params)
} else {
if (terminal->pvt->flags.bw) {
/* Wrap to the previous line. */
- screen->cursor_current.col = terminal->column_count - 1;
+ screen->cursor_current.col = terminal->pvt->column_count - 1;
if (screen->scrolling_restricted) {
vte_sequence_handler_sr (terminal, params);
} else {
@@ -1653,7 +1653,7 @@ vte_sequence_handler_ll (VteTerminal *terminal, GValueArray *params)
screen = terminal->pvt->screen;
screen->cursor_current.row = MAX(screen->insert_delta,
screen->insert_delta +
- terminal->row_count - 1);
+ terminal->pvt->row_count - 1);
screen->cursor_current.col = 0;
}
@@ -1716,7 +1716,7 @@ vte_sequence_handler_nd (VteTerminal *terminal, GValueArray *params)
{
VteScreen *screen;
screen = terminal->pvt->screen;
- if ((screen->cursor_current.col + 1) < terminal->column_count) {
+ if ((screen->cursor_current.col + 1) < terminal->pvt->column_count) {
/* There's room to move right. */
screen->cursor_current.col++;
}
@@ -1754,7 +1754,7 @@ vte_sequence_handler_rc (VteTerminal *terminal, GValueArray *params)
screen->insert_delta,
screen->insert_delta,
screen->insert_delta +
- terminal->row_count - 1);
+ terminal->pvt->row_count - 1);
}
/* Cursor down, with scrolling. */
@@ -1780,7 +1780,7 @@ vte_sequence_handler_sc (VteTerminal *terminal, GValueArray *params)
screen->cursor_saved.col = screen->cursor_current.col;
screen->cursor_saved.row = CLAMP(screen->cursor_current.row -
screen->insert_delta,
- 0, terminal->row_count - 1);
+ 0, terminal->pvt->row_count - 1);
}
/* Scroll the text down, but don't move the cursor. */
@@ -1971,7 +1971,7 @@ vte_sequence_handler_sr (VteTerminal *terminal, GValueArray *params)
end = screen->scrolling_region.end + screen->insert_delta;
} else {
start = terminal->pvt->screen->insert_delta;
- end = start + terminal->row_count - 1;
+ end = start + terminal->pvt->row_count - 1;
}
if (screen->cursor_current.row == start) {
@@ -1982,7 +1982,7 @@ vte_sequence_handler_sr (VteTerminal *terminal, GValueArray *params)
/* Update the display. */
_vte_terminal_scroll_region(terminal, start, end - start + 1, 1);
_vte_invalidate_cells(terminal,
- 0, terminal->column_count,
+ 0, terminal->pvt->column_count,
start, 2);
} else {
/* Otherwise, just move the cursor up. */
@@ -2036,8 +2036,8 @@ vte_sequence_handler_ta (VteTerminal *terminal, GValueArray *params)
/* If we have no tab stops or went past the end of the line, stop
* at the right-most column. */
- if (newcol >= terminal->column_count) {
- newcol = terminal->column_count - 1;
+ if (newcol >= terminal->pvt->column_count) {
+ newcol = terminal->pvt->column_count - 1;
}
/* but make sure we don't move cursor back (bug #340631) */
@@ -2189,7 +2189,7 @@ vte_sequence_handler_up (VteTerminal *terminal, GValueArray *params)
end = screen->insert_delta + screen->scrolling_region.end;
} else {
start = screen->insert_delta;
- end = start + terminal->row_count - 1;
+ end = start + terminal->pvt->row_count - 1;
}
screen->cursor_current.row = MAX(screen->cursor_current.row - 1, start);
@@ -2427,7 +2427,7 @@ vte_sequence_handler_cursor_character_absolute (VteTerminal *terminal, GValueArr
value = g_value_array_get_nth(params, 0);
if (G_VALUE_HOLDS_LONG(value)) {
val = CLAMP(g_value_get_long(value),
- 1, terminal->column_count) - 1;
+ 1, terminal->pvt->column_count) - 1;
}
}
@@ -2777,7 +2777,7 @@ vte_sequence_handler_insert_lines (VteTerminal *terminal, GValueArray *params)
if (screen->scrolling_restricted) {
end = screen->insert_delta + screen->scrolling_region.end;
} else {
- end = screen->insert_delta + terminal->row_count - 1;
+ end = screen->insert_delta + terminal->pvt->row_count - 1;
}
/* Insert the new lines at the cursor. */
for (i = 0; i < param; i++) {
@@ -2818,7 +2818,7 @@ vte_sequence_handler_delete_lines (VteTerminal *terminal, GValueArray *params)
if (screen->scrolling_restricted) {
end = screen->insert_delta + screen->scrolling_region.end;
} else {
- end = screen->insert_delta + terminal->row_count - 1;
+ end = screen->insert_delta + terminal->pvt->row_count - 1;
}
/* Clear them from below the current cursor. */
for (i = 0; i < param; i++) {
@@ -2987,7 +2987,7 @@ vte_sequence_handler_screen_alignment_test (VteTerminal *terminal, GValueArray *
screen = terminal->pvt->screen;
for (row = terminal->pvt->screen->insert_delta;
- row < terminal->pvt->screen->insert_delta + terminal->row_count;
+ row < terminal->pvt->screen->insert_delta + terminal->pvt->row_count;
row++) {
/* Find this row. */
while (_vte_ring_next(screen->row_data) <= row)
@@ -3003,7 +3003,7 @@ vte_sequence_handler_screen_alignment_test (VteTerminal *terminal, GValueArray *
cell.c = 'E';
cell.attr = basic_cell.cell.attr;
cell.attr.columns = 1;
- _vte_row_data_fill (rowdata, &cell, terminal->column_count);
+ _vte_row_data_fill (rowdata, &cell, terminal->pvt->column_count);
_vte_terminal_emit_text_inserted(terminal);
}
_vte_invalidate_all(terminal);
@@ -3190,8 +3190,8 @@ vte_sequence_handler_window_manipulation (VteTerminal *terminal, GValueArray *pa
"Reporting widget size.\n");
g_snprintf(buf, sizeof(buf),
_VTE_CAP_CSI "8;%ld;%ldt",
- terminal->row_count,
- terminal->column_count);
+ terminal->pvt->row_count,
+ terminal->pvt->column_count);
vte_terminal_feed_child(terminal, buf, -1);
break;
case 19:
@@ -3240,7 +3240,7 @@ vte_sequence_handler_window_manipulation (VteTerminal *terminal, GValueArray *pa
/* Resize to the specified number of
* rows. */
vte_terminal_emit_resize_window(terminal,
- terminal->column_count * terminal->pvt->char_width +
+ terminal->pvt->column_count * terminal->pvt->char_width +
terminal->pvt->inner_border.left +
terminal->pvt->inner_border.right,
param * terminal->pvt->char_height +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]