Hello community,
here is the log from the commit of package vte for openSUSE:Factory checked in at 2016-02-23 16:54:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vte (Old)
and /work/SRC/openSUSE:Factory/.vte.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vte"
Changes:
--------
--- /work/SRC/openSUSE:Factory/vte/vte.changes 2016-02-12 11:20:41.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.vte.new/vte.changes 2016-02-23 16:54:02.000000000 +0100
@@ -1,0 +2,7 @@
+Thu Feb 11 19:16:21 UTC 2016 - zaitor@opensuse.org
+
+- Update to version 0.42.4:
+ + emulation: Track the cursor separately for the two screens
+ (bgo#761097).
+
+-------------------------------------------------------------------
Old:
----
vte-0.42.3.tar.xz
New:
----
vte-0.42.4.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ vte.spec ++++++
--- /var/tmp/diff_new_pack.kpwG44/_old 2016-02-23 16:54:03.000000000 +0100
+++ /var/tmp/diff_new_pack.kpwG44/_new 2016-02-23 16:54:03.000000000 +0100
@@ -24,7 +24,7 @@
Name: vte
%define _name vte
Url: http://www.gnome.org
-Version: 0.42.3
+Version: 0.42.4
Release: 0
Summary: Terminal Emulator Library
License: LGPL-2.0 and GPL-2.0+
++++++ vte-0.42.3.tar.xz -> vte-0.42.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vte-0.42.3/ChangeLog new/vte-0.42.4/ChangeLog
--- old/vte-0.42.3/ChangeLog 2016-01-28 18:11:30.000000000 +0100
+++ new/vte-0.42.4/ChangeLog 2016-02-11 19:35:40.000000000 +0100
@@ -1,3 +1,29 @@
+commit fff3b5f904d3b6d1deb9beec9ae871b135696966
+Author: Egmont Koblinger
+Date: Thu Jan 28 14:09:55 2016 +0100
+
+ emulation: Track the cursor separately for the two screens
+
+ This is required to correctly resize the normal screen's contents
+ while the alternate screen is active, fixing a bug introduced by
+ commit 5a434e6c4457bdfe182a13213396e7a66a08f767.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=761097
+
+ src/vte.cc | 160 +++++++++++++++++++++++++----------------------------
+ src/vteinternal.hh | 4 +-
+ src/vteseq.cc | 152 +++++++++++++++++++++++++-------------------------
+ 3 files changed, 153 insertions(+), 163 deletions(-)
+
+commit 767df6981cf2d3d78b96a1aa49d257a97c96c2ff
+Author: Christian Persch
+Date: Sun Jan 17 21:40:57 2016 +0100
+
+ Post release version bump
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
commit 6c58c04c2212d5d34eaf92f1d8adef15af2b59e9
Author: Christian Persch
Date: Thu Jan 14 13:34:59 2016 +0100
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vte-0.42.3/configure new/vte-0.42.4/configure
--- old/vte-0.42.3/configure 2016-01-28 18:09:33.000000000 +0100
+++ new/vte-0.42.4/configure 2016-02-11 19:32:58.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for vte 0.42.3.
+# Generated by GNU Autoconf 2.69 for vte 0.42.4.
#
# Report bugs to http://bugzilla.gnome.org/enter_bug.cgi?product=vte.
#
@@ -651,8 +651,8 @@
# Identity of this package.
PACKAGE_NAME='vte'
PACKAGE_TARNAME='vte'
-PACKAGE_VERSION='0.42.3'
-PACKAGE_STRING='vte 0.42.3'
+PACKAGE_VERSION='0.42.4'
+PACKAGE_STRING='vte 0.42.4'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=vte'
PACKAGE_URL=''
@@ -1545,7 +1545,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures vte 0.42.3 to adapt to many kinds of systems.
+\`configure' configures vte 0.42.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1615,7 +1615,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of vte 0.42.3:";;
+ short | recursive ) echo "Configuration of vte 0.42.4:";;
esac
cat <<\_ACEOF
@@ -1768,7 +1768,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-vte configure 0.42.3
+vte configure 0.42.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2358,7 +2358,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by vte $as_me 0.42.3, which was
+It was created by vte $as_me 0.42.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3227,7 +3227,7 @@
# Define the identity of the package.
PACKAGE='vte'
- VERSION='0.42.3'
+ VERSION='0.42.4'
cat >>confdefs.h <<_ACEOF
@@ -3396,7 +3396,7 @@
-LT_VERSION_INFO="4200:3:4200"
+LT_VERSION_INFO="4200:4:4200"
################################################################################
@@ -19839,7 +19839,7 @@
VTE_MINOR_VERSION=42
-VTE_MICRO_VERSION=3
+VTE_MICRO_VERSION=4
@@ -20451,7 +20451,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by vte $as_me 0.42.3, which was
+This file was extended by vte $as_me 0.42.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20517,7 +20517,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-vte config.status 0.42.3
+vte config.status 0.42.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vte-0.42.3/configure.ac new/vte-0.42.4/configure.ac
--- old/vte-0.42.3/configure.ac 2016-01-28 18:09:07.000000000 +0100
+++ new/vte-0.42.4/configure.ac 2016-02-11 19:31:41.000000000 +0100
@@ -1,6 +1,6 @@
m4_define([version_major],0)
m4_define([version_minor],42)
-m4_define([version_micro],3)
+m4_define([version_micro],4)
m4_define([version_triplet],version_major.version_minor.version_micro)
AC_PREREQ([2.63])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vte-0.42.3/doc/reference/html/index.html new/vte-0.42.4/doc/reference/html/index.html
--- old/vte-0.42.3/doc/reference/html/index.html 2016-01-28 18:11:35.000000000 +0100
+++ new/vte-0.42.4/doc/reference/html/index.html 2016-02-11 19:35:49.000000000 +0100
@@ -15,7 +15,7 @@
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">VTE Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">
- Documentation for VTE version 0.42.3
+ Documentation for VTE version 0.42.4
.
The latest version of this documentation can be found on-line at the
<a class="ulink" href="http://library.gnome.org/devel/vte/" target="_top">GNOME Library</a>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vte-0.42.3/doc/reference/html/vte-Version-Information.html new/vte-0.42.4/doc/reference/html/vte-Version-Information.html
--- old/vte-0.42.3/doc/reference/html/vte-Version-Information.html 2016-01-28 18:11:35.000000000 +0100
+++ new/vte-0.42.4/doc/reference/html/vte-Version-Information.html 2016-02-11 19:35:49.000000000 +0100
@@ -120,7 +120,7 @@
<hr>
<div class="refsect2">
<a name="VTE-MICRO-VERSION:CAPS"></a><h3>VTE_MICRO_VERSION</h3>
-<pre class="programlisting">#define VTE_MICRO_VERSION (3)
+<pre class="programlisting">#define VTE_MICRO_VERSION (4)
</pre>
<p>The micro version number of the VTE library
(e.g. in version 3.1.4 this is 4).</p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vte-0.42.3/doc/reference/version.xml new/vte-0.42.4/doc/reference/version.xml
--- old/vte-0.42.3/doc/reference/version.xml 2016-01-28 18:09:45.000000000 +0100
+++ new/vte-0.42.4/doc/reference/version.xml 2016-02-11 19:33:16.000000000 +0100
@@ -1 +1 @@
-0.42.3
+0.42.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vte-0.42.3/src/vte.cc new/vte-0.42.4/src/vte.cc
--- old/vte-0.42.3/src/vte.cc 2016-01-28 18:09:07.000000000 +0100
+++ new/vte-0.42.4/src/vte.cc 2016-02-11 19:27:41.000000000 +0100
@@ -743,8 +743,8 @@
if (terminal->pvt->cursor_visible) {
preedit_width = vte_terminal_preedit_width(terminal, FALSE);
- row = terminal->pvt->cursor.row;
- column = terminal->pvt->cursor.col;
+ row = terminal->pvt->screen->cursor.row;
+ column = terminal->pvt->screen->cursor.col;
columns = 1;
column = find_start_column (terminal, column, row);
cell = vte_terminal_find_charcell(terminal, column, row);
@@ -1843,8 +1843,7 @@
* area. Leave the scrolling delta alone because it will be updated
* when the adjustment changes. */
screen->insert_delta = MAX(screen->insert_delta, delta);
- terminal->pvt->cursor.row = MAX(terminal->pvt->cursor.row,
- screen->insert_delta);
+ screen->cursor.row = MAX(screen->cursor.row, screen->insert_delta);
if (screen->scroll_delta > screen->insert_delta) {
vte_terminal_queue_adjustment_value_changed(terminal,
@@ -2137,7 +2136,7 @@
/* Must make sure we're in a sane area. */
screen = terminal->pvt->screen;
- v = terminal->pvt->cursor.row;
+ v = screen->cursor.row;
/* Figure out how many rows we need to add. */
delta = v - _vte_ring_next(screen->row_data) + 1;
@@ -2159,7 +2158,7 @@
VteRowData *row;
row = _vte_terminal_ensure_row (terminal);
- _vte_row_data_fill (row, &basic_cell.cell, terminal->pvt->cursor.col);
+ _vte_row_data_fill (row, &basic_cell.cell, terminal->pvt->screen->cursor.col);
return row;
}
@@ -2177,7 +2176,7 @@
/* The total number of lines. Add one to the cursor offset
* because it's zero-based. */
rows = _vte_ring_next (screen->row_data);
- delta = terminal->pvt->cursor.row - rows + 1;
+ delta = screen->cursor.row - rows + 1;
if (G_UNLIKELY (delta > 0)) {
vte_terminal_insert_rows (terminal, delta);
rows = _vte_ring_next (screen->row_data);
@@ -2189,7 +2188,7 @@
delta = screen->insert_delta;
delta = MIN(delta, rows - terminal->pvt->row_count);
delta = MAX(delta,
- terminal->pvt->cursor.row - (terminal->pvt->row_count - 1));
+ screen->cursor.row - (terminal->pvt->row_count - 1));
delta = MAX(delta, _vte_ring_delta(screen->row_data));
/* Adjust the insert delta and scroll if needed. */
@@ -2921,7 +2920,7 @@
cell_end->attr.columns = 1;
_vte_invalidate_cells(terminal,
end, 1,
- terminal->pvt->cursor.row, 1);
+ terminal->pvt->screen->cursor.row, 1);
}
}
@@ -2947,7 +2946,7 @@
g_assert(start - col == 1);
_vte_invalidate_cells(terminal,
col, 1,
- terminal->pvt->cursor.row, 1);
+ terminal->pvt->screen->cursor.row, 1);
}
keep_going = FALSE;
}
@@ -2974,19 +2973,19 @@
start = screen->insert_delta;
end = start + terminal->pvt->row_count - 1;
}
- if (terminal->pvt->cursor.row == end) {
+ if (screen->cursor.row == end) {
if (terminal->pvt->scrolling_restricted) {
if (start == screen->insert_delta) {
/* Scroll this line into the scrollback
* buffer by inserting a line at the next
* line and scrolling the area up. */
screen->insert_delta++;
- terminal->pvt->cursor.row++;
+ screen->cursor.row++;
/* update start and end, as they are relative
* to insert_delta. */
start++;
end++;
- _vte_terminal_ring_insert (terminal, terminal->pvt->cursor.row, FALSE);
+ _vte_terminal_ring_insert (terminal, screen->cursor.row, FALSE);
/* Force the areas below the region to be
* redrawn -- they've moved. */
_vte_terminal_scroll_region(terminal, start,
@@ -3008,7 +3007,7 @@
}
} else {
/* Scroll up with history. */
- terminal->pvt->cursor.row++;
+ screen->cursor.row++;
_vte_terminal_update_insert_delta(terminal);
}
@@ -3020,7 +3019,7 @@
}
} else {
/* Otherwise, just move the cursor down. */
- terminal->pvt->cursor.row++;
+ screen->cursor.row++;
}
}
@@ -3042,9 +3041,9 @@
void
_vte_terminal_restore_cursor (VteTerminal *terminal, VteScreen *screen)
{
- terminal->pvt->cursor.col = screen->saved.cursor.col;
- terminal->pvt->cursor.row = screen->insert_delta + CLAMP(screen->saved.cursor.row,
- 0, terminal->pvt->row_count - 1);
+ screen->cursor.col = screen->saved.cursor.col;
+ screen->cursor.row = screen->insert_delta + CLAMP(screen->saved.cursor.row,
+ 0, terminal->pvt->row_count - 1);
terminal->pvt->reverse_mode = screen->saved.reverse_mode;
terminal->pvt->origin_mode = screen->saved.origin_mode;
@@ -3063,8 +3062,8 @@
void
_vte_terminal_save_cursor (VteTerminal *terminal, VteScreen *screen)
{
- screen->saved.cursor.col = terminal->pvt->cursor.col;
- screen->saved.cursor.row = terminal->pvt->cursor.row - screen->insert_delta;
+ screen->saved.cursor.col = screen->cursor.col;
+ screen->saved.cursor.row = screen->cursor.row - screen->insert_delta;
screen->saved.reverse_mode = terminal->pvt->reverse_mode;
screen->saved.origin_mode = terminal->pvt->origin_mode;
@@ -3144,21 +3143,21 @@
columns = _vte_unichar_width(c, terminal->pvt->utf8_ambiguous_width);
/* If we're autowrapping here, do it. */
- col = terminal->pvt->cursor.col;
+ col = screen->cursor.col;
if (G_UNLIKELY (columns && col + columns > terminal->pvt->column_count)) {
if (terminal->pvt->autowrap) {
_vte_debug_print(VTE_DEBUG_ADJ,
"Autowrapping before character\n");
/* Wrap. */
/* XXX clear to the end of line */
- col = terminal->pvt->cursor.col = 0;
+ col = screen->cursor.col = 0;
/* Mark this line as soft-wrapped. */
row = _vte_terminal_ensure_row (terminal);
row->attr.soft_wrapped = 1;
_vte_terminal_cursor_down (terminal);
} else {
/* Don't wrap, stay at the rightmost column. */
- col = terminal->pvt->cursor.col =
+ col = screen->cursor.col =
terminal->pvt->column_count - columns;
}
line_wrapped = TRUE;
@@ -3169,7 +3168,7 @@
(long)c, c < 256 ? c : ' ',
(int)terminal->pvt->color_defaults.attr.fore,
(int)terminal->pvt->color_defaults.attr.back,
- col, columns, (long)terminal->pvt->cursor.row,
+ col, columns, (long)screen->cursor.row,
(long)screen->insert_delta);
@@ -3182,7 +3181,7 @@
_vte_debug_print(VTE_DEBUG_PARSE, "combining U+%04X", c);
- row_num = terminal->pvt->cursor.row;
+ row_num = screen->cursor.row;
row = NULL;
if (G_UNLIKELY (col == 0)) {
/* We are at first column. See if the previous line softwrapped.
@@ -3282,10 +3281,10 @@
_vte_invalidate_cells(terminal,
col - columns,
insert ? terminal->pvt->column_count : columns,
- terminal->pvt->cursor.row, 1);
+ screen->cursor.row, 1);
}
- terminal->pvt->cursor.col = col;
+ screen->cursor.col = col;
done:
/* We added text, so make a note of it. */
@@ -3724,12 +3723,12 @@
bottom = screen->insert_delta == delta;
/* Save the current cursor position. */
- cursor = terminal->pvt->cursor;
+ cursor = screen->cursor;
cursor_visible = terminal->pvt->cursor_visible;
in_scroll_region = terminal->pvt->scrolling_restricted
- && (terminal->pvt->cursor.row >= (screen->insert_delta + terminal->pvt->scrolling_region.start))
- && (terminal->pvt->cursor.row <= (screen->insert_delta + terminal->pvt->scrolling_region.end));
+ && (screen->cursor.row >= (screen->insert_delta + terminal->pvt->scrolling_region.start))
+ && (screen->cursor.row <= (screen->insert_delta + terminal->pvt->scrolling_region.end));
/* We should only be called when there's data to process. */
g_assert(terminal->pvt->incoming ||
@@ -3839,8 +3838,8 @@
modified = TRUE;
new_in_scroll_region = terminal->pvt->scrolling_restricted
- && (terminal->pvt->cursor.row >= (screen->insert_delta + terminal->pvt->scrolling_region.start))
- && (terminal->pvt->cursor.row <= (screen->insert_delta + terminal->pvt->scrolling_region.end));
+ && (screen->cursor.row >= (screen->insert_delta + terminal->pvt->scrolling_region.start))
+ && (screen->cursor.row <= (screen->insert_delta + terminal->pvt->scrolling_region.end));
delta = screen->scroll_delta; /* delta may have changed from sequence. */
@@ -3849,10 +3848,10 @@
*/
if (invalidated_text &&
((new_in_scroll_region && !in_scroll_region) ||
- (terminal->pvt->cursor.col > bbox_bottomright.x + VTE_CELL_BBOX_SLACK ||
- terminal->pvt->cursor.col < bbox_topleft.x - VTE_CELL_BBOX_SLACK ||
- terminal->pvt->cursor.row > bbox_bottomright.y + VTE_CELL_BBOX_SLACK ||
- terminal->pvt->cursor.row < bbox_topleft.y - VTE_CELL_BBOX_SLACK))) {
+ (screen->cursor.col > bbox_bottomright.x + VTE_CELL_BBOX_SLACK ||
+ screen->cursor.col < bbox_topleft.x - VTE_CELL_BBOX_SLACK ||
+ screen->cursor.row > bbox_bottomright.y + VTE_CELL_BBOX_SLACK ||
+ screen->cursor.row < bbox_topleft.y - VTE_CELL_BBOX_SLACK))) {
/* Clip off any part of the box which isn't already on-screen. */
bbox_topleft.x = MAX(bbox_topleft.x, 0);
bbox_topleft.y = MAX(bbox_topleft.y, delta);
@@ -3931,20 +3930,18 @@
}
}
- bbox_topleft.x = MIN(bbox_topleft.x,
- terminal->pvt->cursor.col);
- bbox_topleft.y = MIN(bbox_topleft.y,
- terminal->pvt->cursor.row);
+ bbox_topleft.x = MIN(bbox_topleft.x, screen->cursor.col);
+ bbox_topleft.y = MIN(bbox_topleft.y, screen->cursor.row);
/* Insert the character. */
if (G_UNLIKELY (_vte_terminal_insert_char(terminal, c,
FALSE, FALSE))) {
/* line wrapped, correct bbox */
if (invalidated_text &&
- (terminal->pvt->cursor.col > bbox_bottomright.x + VTE_CELL_BBOX_SLACK ||
- terminal->pvt->cursor.col < bbox_topleft.x - VTE_CELL_BBOX_SLACK ||
- terminal->pvt->cursor.row > bbox_bottomright.y + VTE_CELL_BBOX_SLACK ||
- terminal->pvt->cursor.row < bbox_topleft.y - VTE_CELL_BBOX_SLACK)) {
+ (screen->cursor.col > bbox_bottomright.x + VTE_CELL_BBOX_SLACK ||
+ screen->cursor.col < bbox_topleft.x - VTE_CELL_BBOX_SLACK ||
+ screen->cursor.row > bbox_bottomright.y + VTE_CELL_BBOX_SLACK ||
+ screen->cursor.row < bbox_topleft.y - VTE_CELL_BBOX_SLACK)) {
/* Clip off any part of the box which isn't already on-screen. */
bbox_topleft.x = MAX(bbox_topleft.x, 0);
bbox_topleft.y = MAX(bbox_topleft.y, delta);
@@ -3964,16 +3961,13 @@
}
bbox_topleft.x = MIN(bbox_topleft.x, 0);
- bbox_topleft.y = MIN(bbox_topleft.y,
- terminal->pvt->cursor.row);
+ bbox_topleft.y = MIN(bbox_topleft.y, screen->cursor.row);
}
/* Add the cells over which we have moved to the region
* which we need to refresh for the user. */
- bbox_bottomright.x = MAX(bbox_bottomright.x,
- terminal->pvt->cursor.col);
+ bbox_bottomright.x = MAX(bbox_bottomright.x, screen->cursor.col);
/* cursor.row + 1 (defer until inv.) */
- bbox_bottomright.y = MAX(bbox_bottomright.y,
- terminal->pvt->cursor.row);
+ bbox_bottomright.y = MAX(bbox_bottomright.y, screen->cursor.row);
invalidated_text = TRUE;
/* We *don't* emit flush pending signals here. */
@@ -4007,7 +4001,7 @@
_vte_ring_delta(screen->row_data));
/* The cursor shouldn't be above or below the addressable
* part of the display buffer. */
- g_assert(terminal->pvt->cursor.row >= terminal->pvt->screen->insert_delta);
+ g_assert(screen->cursor.row >= screen->insert_delta);
#endif
next_match:
@@ -4082,8 +4076,8 @@
}
- if ((cursor.col != terminal->pvt->cursor.col) ||
- (cursor.row != terminal->pvt->cursor.row)) {
+ if ((cursor.col != terminal->pvt->screen->cursor.col) ||
+ (cursor.row != terminal->pvt->screen->cursor.row)) {
/* invalidate the old and new cursor positions */
if (cursor_visible)
_vte_invalidate_cell(terminal, cursor.col, cursor.row);
@@ -4099,11 +4093,9 @@
/* Tell the input method where the cursor is. */
if (gtk_widget_get_realized (&terminal->widget)) {
GdkRectangle rect;
- rect.x = terminal->pvt->cursor.col *
- terminal->pvt->char_width + terminal->pvt->padding.left;
+ rect.x = terminal->pvt->screen->cursor.col * terminal->pvt->char_width + terminal->pvt->padding.left;
rect.width = terminal->pvt->char_width;
- rect.y = (terminal->pvt->cursor.row - delta) *
- terminal->pvt->char_height + terminal->pvt->padding.top;
+ rect.y = (terminal->pvt->screen->cursor.row - delta) * terminal->pvt->char_height + terminal->pvt->padding.top;
rect.height = terminal->pvt->char_height;
gtk_im_context_set_cursor_location(terminal->pvt->im_context,
&rect);
@@ -4830,8 +4822,7 @@
/* If we're in margin bell mode and on the border of the
* margin, bell. */
if (terminal->pvt->margin_bell) {
- if ((terminal->pvt->cursor.col +
- (glong) terminal->pvt->bell_margin) ==
+ if ((terminal->pvt->screen->cursor.col + (glong) terminal->pvt->bell_margin) ==
terminal->pvt->column_count) {
_vte_terminal_beep (terminal);
}
@@ -6530,10 +6521,10 @@
{
g_return_if_fail(VTE_IS_TERMINAL(terminal));
if (column) {
- *column = terminal->pvt->cursor.col;
+ *column = terminal->pvt->screen->cursor.col;
}
if (row) {
- *row = terminal->pvt->cursor.row;
+ *row = terminal->pvt->screen->cursor.row;
}
}
@@ -8058,14 +8049,14 @@
" cursor_saved (relative to insert_delta) row=%ld col=%ld\n",
screen == &terminal->pvt->normal_screen ? "normal" : "alternate",
screen->insert_delta, screen->scroll_delta,
- terminal->pvt->cursor.row, terminal->pvt->cursor.row - screen->scroll_delta + 1, terminal->pvt->cursor.col,
+ screen->cursor.row, screen->cursor.row - screen->scroll_delta + 1, screen->cursor.col,
screen->saved.cursor.row, screen->saved.cursor.col);
cursor_saved_absolute.row = screen->saved.cursor.row + screen->insert_delta;
cursor_saved_absolute.col = screen->saved.cursor.col;
below_viewport.row = screen->scroll_delta + old_rows;
below_viewport.col = 0;
- below_current_paragraph.row = terminal->pvt->cursor.row + 1;
+ below_current_paragraph.row = screen->cursor.row + 1;
while (below_current_paragraph.row < _vte_ring_next(ring)
&& _vte_ring_index(ring, below_current_paragraph.row - 1)->attr.soft_wrapped) {
below_current_paragraph.row++;
@@ -8075,15 +8066,12 @@
markers[0] = &cursor_saved_absolute;
markers[1] = &below_viewport;
markers[2] = &below_current_paragraph;
- if (screen == terminal->pvt->screen) {
- /* Tracking the current cursor only makes sense on the active screen. */
- markers[3] = &terminal->pvt->cursor;
- if (terminal->pvt->has_selection) {
- /* selection_end is inclusive, make it non-inclusive, see bug 722635. */
- terminal->pvt->selection_end.col++;
- markers[4] = &terminal->pvt->selection_start;
- markers[5] = &terminal->pvt->selection_end;
- }
+ markers[3] = &screen->cursor;
+ if (terminal->pvt->has_selection) {
+ /* selection_end is inclusive, make it non-inclusive, see bug 722635. */
+ terminal->pvt->selection_end.col++;
+ markers[4] = &terminal->pvt->selection_start;
+ markers[5] = &terminal->pvt->selection_end;
}
old_top_lines = below_current_paragraph.row - screen->insert_delta;
@@ -8111,7 +8099,7 @@
}
}
- if (screen == terminal->pvt->screen && terminal->pvt->has_selection) {
+ if (terminal->pvt->has_selection) {
/* Make selection_end inclusive again, see above. */
terminal->pvt->selection_end.col--;
}
@@ -8160,7 +8148,7 @@
" cursor (absolute) row=%ld (visual line %ld) col=%ld\n"
" cursor_saved (relative to insert_delta) row=%ld col=%ld\n\n",
screen->insert_delta, new_scroll_delta,
- terminal->pvt->cursor.row, terminal->pvt->cursor.row - new_scroll_delta + 1, terminal->pvt->cursor.col,
+ screen->cursor.row, screen->cursor.row - new_scroll_delta + 1, screen->cursor.col,
screen->saved.cursor.row, screen->saved.cursor.col);
if (screen == terminal->pvt->screen)
@@ -8225,10 +8213,10 @@
vte_terminal_set_scrollback_lines(terminal,
terminal->pvt->scrollback_lines);
/* Ensure the cursor is valid */
- terminal->pvt->cursor.row = CLAMP (terminal->pvt->cursor.row,
- _vte_ring_delta (terminal->pvt->screen->row_data),
- MAX (_vte_ring_delta (terminal->pvt->screen->row_data),
- _vte_ring_next (terminal->pvt->screen->row_data) - 1));
+ terminal->pvt->screen->cursor.row = CLAMP (terminal->pvt->screen->cursor.row,
+ _vte_ring_delta (terminal->pvt->screen->row_data),
+ MAX (_vte_ring_delta (terminal->pvt->screen->row_data),
+ _vte_ring_next (terminal->pvt->screen->row_data) - 1));
_vte_terminal_adjust_adjustments_full (terminal);
gtk_widget_queue_resize_no_redraw (&terminal->widget);
@@ -9963,8 +9951,8 @@
screen = terminal->pvt->screen;
delta = screen->scroll_delta;
- col = terminal->pvt->cursor.col;
- drow = terminal->pvt->cursor.row;
+ col = screen->cursor.col;
+ drow = screen->cursor.row;
row = drow - delta;
width = terminal->pvt->char_width;
height = terminal->pvt->char_height;
@@ -10104,7 +10092,7 @@
height = terminal->pvt->char_height;
delta = screen->scroll_delta;
- row = terminal->pvt->cursor.row - delta;
+ row = screen->cursor.row - delta;
/* Find out how many columns the pre-edit string takes up. */
columns = vte_terminal_preedit_width(terminal, FALSE);
@@ -10112,7 +10100,7 @@
/* 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 = terminal->pvt->cursor.col;
+ col = screen->cursor.col;
if (col + columns > terminal->pvt->column_count) {
col = MAX(0, terminal->pvt->column_count - columns);
}
@@ -12035,7 +12023,7 @@
/* The main screen gets the full scrollback buffer. */
screen = &terminal->pvt->normal_screen;
lines = MAX (lines, terminal->pvt->row_count);
- next = MAX (terminal->pvt->cursor.row + 1,
+ next = MAX (screen->cursor.row + 1,
_vte_ring_next (screen->row_data));
_vte_ring_resize (screen->row_data, lines);
low = _vte_ring_delta (screen->row_data);
@@ -12234,10 +12222,12 @@
pvt->screen = &pvt->normal_screen;
pvt->normal_screen.scroll_delta = pvt->normal_screen.insert_delta =
_vte_ring_reset(pvt->normal_screen.row_data);
+ pvt->normal_screen.cursor.row = pvt->normal_screen.insert_delta;
+ pvt->normal_screen.cursor.col = 0;
pvt->alternate_screen.scroll_delta = pvt->alternate_screen.insert_delta =
_vte_ring_reset(pvt->alternate_screen.row_data);
- pvt->cursor.row = pvt->screen->insert_delta;
- pvt->cursor.col = 0;
+ pvt->alternate_screen.cursor.row = pvt->alternate_screen.insert_delta;
+ pvt->alternate_screen.cursor.col = 0;
/* Adjust the scrollbar to the new location. */
/* Hack: force a change in scroll_delta even if the value remains, so that
vte_term_q_adj_val_changed() doesn't shortcut to no-op, see bug 730599. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vte-0.42.3/src/vteinternal.hh new/vte-0.42.4/src/vteinternal.hh
--- old/vte-0.42.3/src/vteinternal.hh 2016-01-28 17:59:27.000000000 +0100
+++ new/vte-0.42.4/src/vteinternal.hh 2016-02-11 19:27:41.000000000 +0100
@@ -102,12 +102,13 @@
typedef struct _VteScreen VteScreen;
struct _VteScreen {
VteRing row_data[1]; /* buffer contents */
+ VteVisualPosition cursor; /* absolute value, from the beginning of the terminal history */
long scroll_delta; /* scroll offset */
long insert_delta; /* insertion offset */
/* Stuff saved along with the cursor */
struct {
- VteVisualPosition cursor;
+ VteVisualPosition cursor; /* onscreen coordinate, that is, relative to insert_delta */
gboolean reverse_mode;
gboolean origin_mode;
gboolean sendrecv_mode;
@@ -208,7 +209,6 @@
struct _VteScreen normal_screen, alternate_screen, *screen;
/* Values we save along with the cursor */
- VteVisualPosition cursor; /* relative to the insertion delta */
gboolean reverse_mode; /* reverse mode */
gboolean origin_mode; /* origin mode */
gboolean sendrecv_mode; /* sendrecv mode */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vte-0.42.3/src/vteseq.cc new/vte-0.42.4/src/vteseq.cc
--- old/vte-0.42.3/src/vteseq.cc 2016-01-28 17:59:27.000000000 +0100
+++ new/vte-0.42.4/src/vteseq.cc 2016-02-11 19:27:41.000000000 +0100
@@ -261,8 +261,8 @@
static void
_vte_terminal_ensure_cursor_is_onscreen (VteTerminal *terminal)
{
- if (G_UNLIKELY (terminal->pvt->cursor.col >= terminal->pvt->column_count))
- terminal->pvt->cursor.col = terminal->pvt->column_count - 1;
+ if (G_UNLIKELY (terminal->pvt->screen->cursor.col >= terminal->pvt->column_count))
+ terminal->pvt->screen->cursor.col = terminal->pvt->column_count - 1;
}
static void
@@ -279,8 +279,8 @@
origin = 0;
}
- terminal->pvt->cursor.row = screen->insert_delta + origin;
- terminal->pvt->cursor.col = 0;
+ screen->cursor.row = screen->insert_delta + origin;
+ screen->cursor.col = 0;
}
/* Clear the entire screen. */
@@ -291,7 +291,7 @@
VteScreen *screen;
screen = terminal->pvt->screen;
initial = screen->insert_delta;
- row = terminal->pvt->cursor.row - screen->insert_delta;
+ row = screen->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++)
@@ -299,7 +299,7 @@
/* 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;
+ screen->cursor.row = row + screen->insert_delta;
_vte_terminal_adjust_adjustments(terminal);
/* Redraw everything. */
_vte_invalidate_all(terminal);
@@ -318,9 +318,9 @@
/* If the cursor is actually on the screen, clear data in the row
* which corresponds to the cursor. */
- if (_vte_ring_next(screen->row_data) > terminal->pvt->cursor.row) {
+ if (_vte_ring_next(screen->row_data) > screen->cursor.row) {
/* Get the data for the row which the cursor points to. */
- rowdata = _vte_ring_index_writable (screen->row_data, terminal->pvt->cursor.row);
+ rowdata = _vte_ring_index_writable (screen->row_data, screen->cursor.row);
g_assert(rowdata != NULL);
/* Remove it. */
_vte_row_data_shrink (rowdata, 0);
@@ -330,7 +330,7 @@
/* Repaint this row. */
_vte_invalidate_cells(terminal,
0, terminal->pvt->column_count,
- terminal->pvt->cursor.row, 1);
+ screen->cursor.row, 1);
}
/* We've modified the display. Make a note of it. */
@@ -347,7 +347,7 @@
screen = terminal->pvt->screen;
/* If the cursor is actually on the screen, clear data in the row
* which corresponds to the cursor. */
- for (i = screen->insert_delta; i < terminal->pvt->cursor.row; i++) {
+ for (i = screen->insert_delta; i < screen->cursor.row; i++) {
if (_vte_ring_next(screen->row_data) > i) {
/* Get the data for the row we're erasing. */
rowdata = _vte_ring_index_writable (screen->row_data, i);
@@ -430,9 +430,9 @@
vte_sequence_handler_normal_screen (VteTerminal *terminal, GValueArray *params)
{
/* cursor.row includes insert_delta, adjust accordingly */
- terminal->pvt->cursor.row -= terminal->pvt->screen->insert_delta;
+ long cr = terminal->pvt->screen->cursor.row - terminal->pvt->screen->insert_delta;
terminal->pvt->screen = &terminal->pvt->normal_screen;
- terminal->pvt->cursor.row += terminal->pvt->screen->insert_delta;
+ terminal->pvt->screen->cursor.row = cr + terminal->pvt->screen->insert_delta;
/* Make sure the ring is large enough */
_vte_terminal_ensure_row(terminal);
@@ -443,9 +443,9 @@
vte_sequence_handler_alternate_screen (VteTerminal *terminal, GValueArray *params)
{
/* cursor.row includes insert_delta, adjust accordingly */
- terminal->pvt->cursor.row -= terminal->pvt->screen->insert_delta;
+ long cr = terminal->pvt->screen->cursor.row - terminal->pvt->screen->insert_delta;
terminal->pvt->screen = &terminal->pvt->alternate_screen;
- terminal->pvt->cursor.row += terminal->pvt->screen->insert_delta;
+ terminal->pvt->screen->cursor.row = cr + terminal->pvt->screen->insert_delta;
/* Make sure the ring is large enough */
_vte_terminal_ensure_row(terminal);
@@ -591,7 +591,7 @@
VteTerminalSequenceHandler handler)
{
vte_sequence_handler_multiple_limited(terminal, params, handler,
- terminal->pvt->column_count - terminal->pvt->cursor.col);
+ terminal->pvt->column_count - terminal->pvt->screen->cursor.col);
}
static void
@@ -1035,7 +1035,7 @@
long newcol;
/* Calculate which column is the previous tab stop. */
- newcol = terminal->pvt->cursor.col;
+ newcol = terminal->pvt->screen->cursor.col;
if (terminal->pvt->tabstops != NULL) {
/* Find the next tabstop. */
@@ -1051,7 +1051,7 @@
/* Warp the cursor. */
_vte_debug_print(VTE_DEBUG_PARSE,
"Moving cursor to column %ld.\n", (long)newcol);
- terminal->pvt->cursor.col = newcol;
+ terminal->pvt->screen->cursor.col = newcol;
}
/* Clear from the cursor position (inclusive!) to the beginning of the line. */
@@ -1067,11 +1067,11 @@
/* Get the data for the row which the cursor points to. */
rowdata = _vte_terminal_ensure_row(terminal);
/* Clean up Tab/CJK fragments. */
- _vte_terminal_cleanup_fragments (terminal, 0, terminal->pvt->cursor.col + 1);
+ _vte_terminal_cleanup_fragments (terminal, 0, terminal->pvt->screen->cursor.col + 1);
/* Clear the data up to the current column with the default
* attributes. If there is no such character cell, we need
* to add one. */
- for (i = 0; i <= terminal->pvt->cursor.col; i++) {
+ for (i = 0; i <= terminal->pvt->screen->cursor.col; i++) {
if (i < (glong) _vte_row_data_length (rowdata)) {
/* Muck with the cell in this location. */
pcell = _vte_row_data_get_writable (rowdata, i);
@@ -1083,8 +1083,8 @@
}
/* Repaint this row. */
_vte_invalidate_cells(terminal,
- 0, terminal->pvt->cursor.col+1,
- terminal->pvt->cursor.row, 1);
+ 0, terminal->pvt->screen->cursor.col+1,
+ terminal->pvt->screen->cursor.row, 1);
/* We've modified the display. Make a note of it. */
terminal->pvt->text_deleted_flag = TRUE;
@@ -1103,19 +1103,19 @@
screen = terminal->pvt->screen;
/* If the cursor is actually on the screen, clear the rest of the
* row the cursor is on and all of the rows below the cursor. */
- i = terminal->pvt->cursor.row;
+ i = screen->cursor.row;
if (i < _vte_ring_next(screen->row_data)) {
/* Get the data for the row we're clipping. */
rowdata = _vte_ring_index_writable (screen->row_data, i);
/* Clean up Tab/CJK fragments. */
- if ((glong) _vte_row_data_length (rowdata) > terminal->pvt->cursor.col)
- _vte_terminal_cleanup_fragments (terminal, terminal->pvt->cursor.col, _vte_row_data_length (rowdata));
+ if ((glong) _vte_row_data_length (rowdata) > screen->cursor.col)
+ _vte_terminal_cleanup_fragments (terminal, screen->cursor.col, _vte_row_data_length (rowdata));
/* Clear everything to the right of the cursor. */
if (rowdata)
- _vte_row_data_shrink (rowdata, terminal->pvt->cursor.col);
+ _vte_row_data_shrink (rowdata, screen->cursor.col);
}
/* Now for the rest of the lines. */
- for (i = terminal->pvt->cursor.row + 1;
+ for (i = screen->cursor.row + 1;
i < _vte_ring_next(screen->row_data);
i++) {
/* Get the data for the row we're removing. */
@@ -1125,7 +1125,7 @@
_vte_row_data_shrink (rowdata, 0);
}
/* Now fill the cleared areas. */
- for (i = terminal->pvt->cursor.row;
+ for (i = screen->cursor.row;
i < screen->insert_delta + terminal->pvt->row_count;
i++) {
/* Retrieve the row's data, creating it if necessary. */
@@ -1167,12 +1167,12 @@
/* Get the data for the row which the cursor points to. */
rowdata = _vte_terminal_ensure_row(terminal);
g_assert(rowdata != NULL);
- if ((glong) _vte_row_data_length (rowdata) > terminal->pvt->cursor.col) {
+ if ((glong) _vte_row_data_length (rowdata) > terminal->pvt->screen->cursor.col) {
/* Clean up Tab/CJK fragments. */
- _vte_terminal_cleanup_fragments (terminal, terminal->pvt->cursor.col, _vte_row_data_length (rowdata));
+ _vte_terminal_cleanup_fragments (terminal, terminal->pvt->screen->cursor.col, _vte_row_data_length (rowdata));
/* Remove the data at the end of the array until the current column
* is the end of the array. */
- _vte_row_data_shrink (rowdata, terminal->pvt->cursor.col);
+ _vte_row_data_shrink (rowdata, terminal->pvt->screen->cursor.col);
/* We've modified the display. Make a note of it. */
terminal->pvt->text_deleted_flag = TRUE;
}
@@ -1183,10 +1183,10 @@
rowdata->attr.soft_wrapped = 0;
/* Repaint this row. */
_vte_invalidate_cells(terminal,
- terminal->pvt->cursor.col,
+ terminal->pvt->screen->cursor.col,
terminal->pvt->column_count -
- terminal->pvt->cursor.col,
- terminal->pvt->cursor.row, 1);
+ terminal->pvt->screen->cursor.col,
+ terminal->pvt->screen->cursor.row, 1);
}
/* Move the cursor to the given column (horizontal position), 1-based. */
@@ -1206,7 +1206,7 @@
}
}
- terminal->pvt->cursor.col = val;
+ terminal->pvt->screen->cursor.col = val;
}
/* Move the cursor to the given position, 1-based. */
@@ -1244,15 +1244,15 @@
}
}
}
- terminal->pvt->cursor.row = rowval + screen->insert_delta;
- terminal->pvt->cursor.col = colval;
+ screen->cursor.row = rowval + screen->insert_delta;
+ screen->cursor.col = colval;
}
/* Carriage return. */
static void
vte_sequence_handler_carriage_return (VteTerminal *terminal, GValueArray *params)
{
- terminal->pvt->cursor.col = 0;
+ terminal->pvt->screen->cursor.col = 0;
}
/* Restrict scrolling and updates to a subset of the visible lines. */
@@ -1316,7 +1316,7 @@
static void
vte_sequence_handler_cursor_next_line (VteTerminal *terminal, GValueArray *params)
{
- terminal->pvt->cursor.col = 0;
+ terminal->pvt->screen->cursor.col = 0;
vte_sequence_handler_cursor_down (terminal, params);
}
@@ -1324,7 +1324,7 @@
static void
vte_sequence_handler_cursor_preceding_line (VteTerminal *terminal, GValueArray *params)
{
- terminal->pvt->cursor.col = 0;
+ terminal->pvt->screen->cursor.col = 0;
vte_sequence_handler_cursor_up (terminal, params);
}
@@ -1356,7 +1356,7 @@
}
val = val - 1 + origin;
val = CLAMP(val, origin, rowmax);
- terminal->pvt->cursor.row = screen->insert_delta + val;
+ screen->cursor.row = screen->insert_delta + val;
}
/* Delete a character at the current cursor position. */
@@ -1371,12 +1371,12 @@
screen = terminal->pvt->screen;
- if (_vte_ring_next(screen->row_data) > terminal->pvt->cursor.row) {
+ if (_vte_ring_next(screen->row_data) > screen->cursor.row) {
long len;
/* Get the data for the row which the cursor points to. */
- rowdata = _vte_ring_index_writable (screen->row_data, terminal->pvt->cursor.row);
+ rowdata = _vte_ring_index_writable (screen->row_data, screen->cursor.row);
g_assert(rowdata != NULL);
- col = terminal->pvt->cursor.col;
+ col = screen->cursor.col;
len = _vte_row_data_length (rowdata);
/* Remove the column. */
if (col < len) {
@@ -1390,7 +1390,7 @@
/* Repaint this row. */
_vte_invalidate_cells(terminal,
col, len - col,
- terminal->pvt->cursor.row, 1);
+ screen->cursor.row, 1);
}
}
@@ -1433,7 +1433,7 @@
}
}
- terminal->pvt->cursor.row = MIN(terminal->pvt->cursor.row + val, end);
+ screen->cursor.row = MIN(screen->cursor.row + val, end);
}
/* Erase characters starting at the cursor position (overwriting N with
@@ -1462,14 +1462,14 @@
/* Clear out the given number of characters. */
rowdata = _vte_terminal_ensure_row(terminal);
- if (_vte_ring_next(screen->row_data) > terminal->pvt->cursor.row) {
+ if (_vte_ring_next(screen->row_data) > screen->cursor.row) {
g_assert(rowdata != NULL);
/* Clean up Tab/CJK fragments. */
- _vte_terminal_cleanup_fragments (terminal, terminal->pvt->cursor.col, terminal->pvt->cursor.col + count);
+ _vte_terminal_cleanup_fragments (terminal, screen->cursor.col, screen->cursor.col + count);
/* Write over the characters. (If there aren't enough, we'll
* need to create them.) */
for (i = 0; i < count; i++) {
- col = terminal->pvt->cursor.col + i;
+ col = screen->cursor.col + i;
if (col >= 0) {
if (col < (glong) _vte_row_data_length (rowdata)) {
/* Replace this cell with the current
@@ -1484,8 +1484,8 @@
}
/* Repaint this row. */
_vte_invalidate_cells(terminal,
- terminal->pvt->cursor.col, count,
- terminal->pvt->cursor.row, 1);
+ screen->cursor.col, count,
+ screen->cursor.row, 1);
}
/* We've modified the display. Make a note of it. */
@@ -1507,11 +1507,11 @@
_vte_terminal_ensure_cursor_is_onscreen(terminal);
- save = terminal->pvt->cursor;
+ save = terminal->pvt->screen->cursor;
_vte_terminal_insert_char(terminal, ' ', TRUE, TRUE);
- terminal->pvt->cursor = save;
+ terminal->pvt->screen->cursor = save;
}
/* Insert N blank characters. */
@@ -1535,9 +1535,9 @@
{
_vte_terminal_ensure_cursor_is_onscreen(terminal);
- if (terminal->pvt->cursor.col > 0) {
+ if (terminal->pvt->screen->cursor.col > 0) {
/* There's room to move left, so do so. */
- terminal->pvt->cursor.col--;
+ terminal->pvt->screen->cursor.col--;
}
}
@@ -1557,7 +1557,7 @@
val = MAX(g_value_get_long(value), 1);
}
}
- terminal->pvt->cursor.col = MAX(terminal->pvt->cursor.col - val, 0);
+ terminal->pvt->screen->cursor.col = MAX(terminal->pvt->screen->cursor.col - val, 0);
}
/* Cursor right N columns. */
@@ -1578,9 +1578,9 @@
}
}
/* The cursor can be further to the right, don't move in that case. */
- if (terminal->pvt->cursor.col < terminal->pvt->column_count) {
+ if (terminal->pvt->screen->cursor.col < terminal->pvt->column_count) {
/* There's room to move right. */
- terminal->pvt->cursor.col = MIN(terminal->pvt->cursor.col + val,
+ terminal->pvt->screen->cursor.col = MIN(terminal->pvt->screen->cursor.col + val,
terminal->pvt->column_count - 1);
}
}
@@ -1589,7 +1589,7 @@
static void
vte_sequence_handler_next_line (VteTerminal *terminal, GValueArray *params)
{
- terminal->pvt->cursor.col = 0;
+ terminal->pvt->screen->cursor.col = 0;
_vte_terminal_cursor_down (terminal);
}
@@ -1763,7 +1763,7 @@
end = start + terminal->pvt->row_count - 1;
}
- if (terminal->pvt->cursor.row == start) {
+ if (screen->cursor.row == start) {
/* If we're at the top of the scrolling region, add a
* line at the top to scroll the bottom off. */
_vte_terminal_ring_remove (terminal, end);
@@ -1775,7 +1775,7 @@
start, 2);
} else {
/* Otherwise, just move the cursor up. */
- terminal->pvt->cursor.row--;
+ screen->cursor.row--;
}
/* Adjust the scrollbars if necessary. */
_vte_terminal_adjust_adjustments(terminal);
@@ -1791,7 +1791,7 @@
terminal->pvt->tabstops = g_hash_table_new(NULL, NULL);
}
_vte_terminal_set_tabstop(terminal,
- terminal->pvt->cursor.col);
+ terminal->pvt->screen->cursor.col);
}
/* Tab. */
@@ -1801,7 +1801,7 @@
long old_len, newcol, col;
/* Calculate which column is the next tab stop. */
- newcol = col = terminal->pvt->cursor.col;
+ newcol = col = terminal->pvt->screen->cursor.col;
g_assert (col >= 0);
@@ -1873,10 +1873,10 @@
}
_vte_invalidate_cells (terminal,
- terminal->pvt->cursor.col,
- newcol - terminal->pvt->cursor.col,
- terminal->pvt->cursor.row, 1);
- terminal->pvt->cursor.col = newcol;
+ terminal->pvt->screen->cursor.col,
+ newcol - terminal->pvt->screen->cursor.col,
+ terminal->pvt->screen->cursor.row, 1);
+ terminal->pvt->screen->cursor.col = newcol;
}
}
@@ -1901,7 +1901,7 @@
}
if (param == 0) {
_vte_terminal_clear_tabstop(terminal,
- terminal->pvt->cursor.col);
+ terminal->pvt->screen->cursor.col);
} else
if (param == 3) {
if (terminal->pvt->tabstops != NULL) {
@@ -1939,7 +1939,7 @@
}
}
- terminal->pvt->cursor.row = MAX(terminal->pvt->cursor.row - val, start);
+ screen->cursor.row = MAX(screen->cursor.row - val, start);
}
/* Vertical tab. */
@@ -2593,7 +2593,7 @@
}
}
/* Find the region we're messing with. */
- row = terminal->pvt->cursor.row;
+ row = screen->cursor.row;
if (terminal->pvt->scrolling_restricted) {
end = screen->insert_delta + terminal->pvt->scrolling_region.end;
} else {
@@ -2612,7 +2612,7 @@
_vte_terminal_ring_remove (terminal, end);
_vte_terminal_ring_insert (terminal, row, TRUE);
}
- terminal->pvt->cursor.col = 0;
+ screen->cursor.col = 0;
/* Update the display. */
_vte_terminal_scroll_region(terminal, row, end - row + 1, param);
/* Adjust the scrollbars if necessary. */
@@ -2640,7 +2640,7 @@
}
}
/* Find the region we're messing with. */
- row = terminal->pvt->cursor.row;
+ row = screen->cursor.row;
if (terminal->pvt->scrolling_restricted) {
end = screen->insert_delta + terminal->pvt->scrolling_region.end;
} else {
@@ -2660,7 +2660,7 @@
_vte_terminal_ring_remove (terminal, row);
_vte_terminal_ring_insert (terminal, end, TRUE);
}
- terminal->pvt->cursor.col = 0;
+ screen->cursor.col = 0;
/* Update the display. */
_vte_terminal_scroll_region(terminal, row, end - row + 1, -param);
/* Adjust the scrollbars if necessary. */
@@ -2700,12 +2700,12 @@
origin = 0;
rowmax = terminal->pvt->row_count - 1;
}
- rowval = terminal->pvt->cursor.row - screen->insert_delta - origin;
+ rowval = screen->cursor.row - screen->insert_delta - origin;
rowval = CLAMP(rowval, 0, rowmax);
g_snprintf(buf, sizeof(buf),
_VTE_CAP_CSI "%ld;%ldR",
rowval + 1,
- CLAMP(terminal->pvt->cursor.col + 1,
+ CLAMP(screen->cursor.col + 1,
1, terminal->pvt->column_count));
vte_terminal_feed_child(terminal, buf, -1);
break;
@@ -2742,12 +2742,12 @@
origin = 0;
rowmax = terminal->pvt->row_count - 1;
}
- rowval = terminal->pvt->cursor.row - screen->insert_delta - origin;
+ rowval = screen->cursor.row - screen->insert_delta - origin;
rowval = CLAMP(rowval, 0, rowmax);
g_snprintf(buf, sizeof(buf),
_VTE_CAP_CSI "?%ld;%ldR",
rowval + 1,
- CLAMP(terminal->pvt->cursor.col + 1,
+ CLAMP(screen->cursor.col + 1,
1, terminal->pvt->column_count));
vte_terminal_feed_child(terminal, buf, -1);
break;