[vte] Bug 588033 - background tabs may lose lines off the bottom of the scrollback
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vte] Bug 588033 - background tabs may lose lines off the bottom of the scrollback
- Date: Fri, 25 Sep 2009 03:18:07 +0000 (UTC)
commit 6bafc718f231bac266c663724334999dfebac16e
Author: Behdad Esfahbod <behdad behdad org>
Date: Thu Sep 24 23:15:07 2009 -0400
Bug 588033 - background tabs may lose lines off the bottom of the scrollback
src/vte.c | 33 ++++++++++++++++++---------------
1 files changed, 18 insertions(+), 15 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index 73150b3..b9e3243 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -7580,6 +7580,18 @@ vte_terminal_set_size(VteTerminal *terminal, glong columns, glong rows)
}
if (old_rows != terminal->row_count ||
old_columns != terminal->column_count) {
+ VteScreen *screen = terminal->pvt->screen;
+ if (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;
+ screen->insert_delta += delta;
+ vte_terminal_queue_adjustment_value_changed (
+ terminal,
+ screen->scroll_delta + delta);
+ }
+ }
gtk_widget_queue_resize (&terminal->widget);
/* Our visible text changed. */
vte_terminal_emit_text_modified(terminal);
@@ -8062,27 +8074,18 @@ vte_terminal_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
if (width != terminal->column_count
|| height != terminal->row_count
|| update_scrollback) {
- VteScreen *screen = terminal->pvt->screen;
- glong visible_rows = MIN (terminal->row_count,
- _vte_ring_length (screen->row_data));
- if (height < visible_rows) {
- glong delta = visible_rows - height;
- screen->insert_delta += delta;
- vte_terminal_queue_adjustment_value_changed (
- terminal,
- screen->scroll_delta + delta);
- }
/* Set the size of the pseudo-terminal. */
vte_terminal_set_size(terminal, width, height);
/* Adjust scrolling area in case our boundaries have just been
* redefined to be invalid. */
- if (terminal->pvt->screen->scrolling_restricted) {
- terminal->pvt->screen->scrolling_region.start =
- MIN(terminal->pvt->screen->scrolling_region.start,
+ VteScreen *screen = terminal->pvt->screen;
+ if (screen->scrolling_restricted) {
+ screen->scrolling_region.start =
+ MIN(screen->scrolling_region.start,
terminal->row_count - 1);
- terminal->pvt->screen->scrolling_region.end =
- MIN(terminal->pvt->screen->scrolling_region.end,
+ screen->scrolling_region.end =
+ MIN(screen->scrolling_region.end,
terminal->row_count - 1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]