include config.h. fix adjustment calculations, which i didn't get quite
authorNalin Dahyabhai <nalin@src.gnome.org>
Fri, 26 Apr 2002 16:22:13 +0000 (16:22 +0000)
committerNalin Dahyabhai <nalin@src.gnome.org>
Fri, 26 Apr 2002 16:22:13 +0000 (16:22 +0000)
* src/ring.c: include config.h.
* src/vte.c: fix adjustment calculations, which i didn't get quite right.

ChangeLog
src/ring.c
src/vte.c

index 08bb29c..334d0b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@
        * src/Makefile.am, src/ring.c, ring.h: add a ring buffer for storing
        scrollback data.
        * src/vte.c: use a ring buffer instead of a GArray to hold scrollback
-       rows.
+       rows.  Fix a bug in that.
 2002-04-26 00:49  nalin
        * Makefile.am: run autogen before tagging so that the tag is always
        correct.
index a4613a1..134c78f 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ident "$Id$"
-
+#include "../config.h"
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
index f7eb9a3..c193039 100644 (file)
--- a/src/vte.c
+++ b/src/vte.c
@@ -460,7 +460,7 @@ vte_terminal_adjust_adjustments(VteTerminal *terminal)
        /* The upper value is the number of rows which might be visible.  (Add
         * one to the cursor offset because it's zero-based.) */
        next = vte_ring_delta(terminal->pvt->screen->row_data) +
-              terminal->row_count;
+              vte_ring_length(terminal->pvt->screen->row_data);
        rows = MAX(next,
                   terminal->pvt->screen->cursor_current.row + 1);
        if (terminal->adjustment->upper != rows) {
@@ -619,7 +619,6 @@ vte_remove_line_int(VteTerminal *terminal, long position)
        if (vte_ring_next(terminal->pvt->screen->row_data) > position) {
                vte_ring_remove(terminal->pvt->screen->row_data, position, TRUE);
        }
-       vte_terminal_adjust_adjustments(terminal);
 }
 
 /* Change the encoding used for the terminal to the given codeset, or the