summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@src.gnome.org>2002-07-19 03:00:29 +0000
committerNalin Dahyabhai <nalin@src.gnome.org>2002-07-19 03:00:29 +0000
commit4107683a49d46a88752c889b24148387554a50b8 (patch)
treec3deea2831c1986ea9b707abcaa5409e87ec4811
parentc7b0c2bbdb11ea8364829a6a7e0e1c4b0749c4cc (diff)
Fudge the repaint line count by one when scrolling regions to ensure that
* src/vte.c: Fudge the repaint line count by one when scrolling regions to ensure that the old cursor gets repainted. Calculate the area which needs to be repainted when reverse-scrolling correctly.
-rw-r--r--ChangeLog4
-rw-r--r--src/vte.c13
-rw-r--r--vte.spec11
3 files changed, 24 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 559ad69..bb2887d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
2002-07-18 nalin
+ * src/vte.c: Fudge the repaint line count by one when scrolling regions
+ to ensure that the old cursor gets repainted. Calculate the area which
+ needs to be repainted when reverse-scrolling correctly.
+2002-07-18 nalin
* src/vte.c: Implement enough of set-mode and reset-mode to allow
toggling of insert mode using this sequence. Move all scrolling into
vte_terminal_scroll_region and use gdk_draw_drawable to avoid repainting
diff --git a/src/vte.c b/src/vte.c
index 03044a8..b324096 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -491,26 +491,33 @@ vte_terminal_scroll_region(VteTerminal *terminal,
widget = GTK_WIDGET(terminal);
gc = widget->style->mid_gc[GTK_WIDGET_STATE(widget)];
+ /* Convenience variables. */
w = terminal->char_width;
h = terminal->char_height;
screen = terminal->pvt->screen;
+ /* Things which are the same regardless of which direction
+ * we're going to scroll. */
src_x = dest_x = 0;
width = w * terminal->column_count;
height = h * (count - MAX(delta, -delta));
+ /* The source and destination locations depend on the scrolling
+ * direction and amount, and we fudge by one because the cursor
+ * is likely to be on the edge, and we need to redraw it. */
if (delta > 0) {
src_y = h * (row - screen->scroll_delta);
dest_y = src_y + h * delta;
refresh_row = row;
- refresh_count = delta;
+ refresh_count = delta + 1;
} else {
dest_y = h * (row - screen->scroll_delta);
src_y = dest_y + h * (-delta);
- refresh_row = row + (-delta);
- refresh_count = count - (-delta);
+ refresh_row = row + count - (-delta) - 1;
+ refresh_count = (-delta) + 1;
}
+ /* XCopyArea. */
gdk_draw_drawable(widget->window, gc, widget->window,
src_x, src_y,
dest_x, dest_y,
diff --git a/vte.spec b/vte.spec
index 48925b5..6270d79 100644
--- a/vte.spec
+++ b/vte.spec
@@ -1,5 +1,5 @@
Name: vte
-Version: 0.5.0
+Version: 0.5.1
Release: 1
Summary: An experimental terminal emulator.
License: LGPL
@@ -58,12 +58,21 @@ make install DESTDIR=$RPM_BUILD_ROOT
%{_libdir}/pkgconfig/*
%changelog
+* Thu Jul 18 2002 Nalin Dahyabhai <nalin@redhat.com> 0.5.1-1
+- fix a couple of scrolling artifacts
+
* Thu Jul 18 2002 Nalin Dahyabhai <nalin@redhat.com> 0.5.0-1
- use gunichars internally
- scroll regions more effectively
- implement part of set-mode/reset-mode (maybe fixes #69143)
- fix corner case in dingus hiliting (#67930, really this time)
+* Thu Jul 18 2002 Jeremy Katz <katzj@redhat.com> 0.4.9-3
+- free trip through the build system
+
+* Tue Jul 16 2002 Nalin Dahyabhai <nalin@redhat.com> 0.4.9-2
+- build in different environment
+
* Tue Jul 16 2002 Nalin Dahyabhai <nalin@redhat.com> 0.4.9-1
- check for iconv failures properly and report them more aggressively
- guess at a proper default bold color (#68965)