[vte] Minor



commit 3df8026931941ea6a5d41c932803f56ded862a00
Author: Behdad Esfahbod <behdad behdad org>
Date:   Thu Sep 24 15:26:49 2009 -0400

    Minor

 src/vte-private.h |    1 +
 src/vte.c         |    7 ++++++-
 src/vteseq.c      |   14 +++++++-------
 3 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/src/vte-private.h b/src/vte-private.h
index 97fbd79..e7ae90b 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -418,6 +418,7 @@ void _vte_terminal_inline_error_message(VteTerminal *terminal, const char *forma
 
 VteRowData *_vte_terminal_ring_insert (VteTerminal *terminal, guint position, gboolean fill);
 VteRowData *_vte_terminal_ring_append (VteTerminal *terminal, gboolean fill);
+void _vte_terminal_ring_remove (VteTerminal *terminal, guint position);
 
 /* vteseq.c: */
 void _vte_terminal_handle_sequence(VteTerminal *terminal,
diff --git a/src/vte.c b/src/vte.c
index 38d52c0..73150b3 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -306,6 +306,11 @@ _vte_terminal_ring_append (VteTerminal *terminal, gboolean fill)
 	return _vte_terminal_ring_insert (terminal, _vte_ring_next (terminal->pvt->screen->row_data), fill);
 }
 
+void
+_vte_terminal_ring_remove (VteTerminal *terminal, guint position)
+{
+	return _vte_ring_remove (terminal->pvt->screen->row_data, position);
+}
 
 /* Reset defaults for character insertion. */
 void
@@ -2909,7 +2914,7 @@ _vte_terminal_cursor_down (VteTerminal *terminal)
 				/* If we're at the bottom of the scrolling
 				 * region, add a line at the top to scroll the
 				 * bottom off. */
-				_vte_ring_remove (terminal->pvt->screen->row_data, start);
+				_vte_terminal_ring_remove (terminal, start);
 				_vte_terminal_ring_insert (terminal, end, TRUE);
 				/* Update the display. */
 				_vte_terminal_scroll_region(terminal, start,
diff --git a/src/vteseq.c b/src/vteseq.c
index e70d246..6969b48 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -370,12 +370,12 @@ _vte_terminal_scroll_text (VteTerminal *terminal, int scroll_amount)
 
 	if (scroll_amount > 0) {
 		for (i = 0; i < scroll_amount; i++) {
-			_vte_ring_remove (terminal->pvt->screen->row_data, end);
+			_vte_terminal_ring_remove (terminal, end);
 			_vte_terminal_ring_insert (terminal, start, TRUE);
 		}
 	} else {
 		for (i = 0; i < -scroll_amount; i++) {
-			_vte_ring_remove (terminal->pvt->screen->row_data, start);
+			_vte_terminal_ring_remove (terminal, start);
 			_vte_terminal_ring_insert (terminal, end, TRUE);
 		}
 	}
@@ -922,7 +922,7 @@ vte_sequence_handler_al (VteTerminal *terminal, GValueArray *params)
 	for (i = 0; i < param; i++) {
 		/* Clear a line off the end of the region and add one to the
 		 * top of the region. */
-		_vte_ring_remove (terminal->pvt->screen->row_data, end);
+		_vte_terminal_ring_remove (terminal, end);
 		_vte_terminal_ring_insert (terminal, start, TRUE);
 		/* Adjust the scrollbars if necessary. */
 		_vte_terminal_adjust_adjustments(terminal);
@@ -1406,7 +1406,7 @@ vte_sequence_handler_dl (VteTerminal *terminal, GValueArray *params)
 	for (i = 0; i < param; i++) {
 		/* Clear a line off the end of the region and add one to the
 		 * top of the region. */
-		_vte_ring_remove (terminal->pvt->screen->row_data, start);
+		_vte_terminal_ring_remove (terminal, start);
 		_vte_terminal_ring_insert (terminal, end, TRUE);
 		/* Adjust the scrollbars if necessary. */
 		_vte_terminal_adjust_adjustments(terminal);
@@ -1975,7 +1975,7 @@ vte_sequence_handler_sr (VteTerminal *terminal, GValueArray *params)
 	if (screen->cursor_current.row == start) {
 		/* If we're at the top of the scrolling region, add a
 		 * line at the top to scroll the bottom off. */
-		_vte_ring_remove (terminal->pvt->screen->row_data, end);
+		_vte_terminal_ring_remove (terminal, end);
 		_vte_terminal_ring_insert (terminal, start, TRUE);
 		/* Update the display. */
 		_vte_terminal_scroll_region(terminal, start, end - start + 1, 1);
@@ -2756,7 +2756,7 @@ vte_sequence_handler_insert_lines (VteTerminal *terminal, GValueArray *params)
 	for (i = 0; i < param; i++) {
 		/* Clear a line off the end of the region and add one to the
 		 * top of the region. */
-		_vte_ring_remove (terminal->pvt->screen->row_data, end);
+		_vte_terminal_ring_remove (terminal, end);
 		_vte_terminal_ring_insert (terminal, row, TRUE);
 	}
 	/* Update the display. */
@@ -2797,7 +2797,7 @@ vte_sequence_handler_delete_lines (VteTerminal *terminal, GValueArray *params)
 	for (i = 0; i < param; i++) {
 		/* Insert a line at the end of the region and remove one from
 		 * the top of the region. */
-		_vte_ring_remove (terminal->pvt->screen->row_data, row);
+		_vte_terminal_ring_remove (terminal, row);
 		_vte_terminal_ring_insert (terminal, end, TRUE);
 	}
 	/* Update the display. */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]