[vte/vte-next: 163/223] Move method to VteBuffer



commit 38e5bdf96ac8e2a01d5e834a3d36391bd9ec9cdd
Author: Christian Persch <chpe gnome org>
Date:   Sun Jun 12 14:22:56 2011 +0200

    Move method to VteBuffer

 src/vteseq.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/vteseq.c b/src/vteseq.c
index b5f4dd6..69ff85b 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -81,14 +81,17 @@ display_control_sequence(const char *name, GValueArray *params)
 /* A couple are duplicated from vte.c, to keep them static... */
 
 /* Find the character an the given position in the backscroll buffer. */
+/* FIXMEchpe: unify this with vte_buffer_find_charcell in vte.c */
 static VteCell *
-vte_terminal_find_charcell (VteTerminal *terminal, glong col, glong row)
+vte_buffer_find_charcell_writable(VteBuffer *buffer,
+                                  glong col,
+                                  glong row)
 {
 	VteRowData *rowdata;
 	VteCell *ret = NULL;
 	VteScreen *screen;
-	g_assert(VTE_IS_TERMINAL(terminal));
-	screen = terminal->pvt->screen;
+
+	screen = buffer->pvt->screen;
 	if (_vte_ring_contains (screen->row_data, row)) {
 		rowdata = _vte_ring_index_writable (screen->row_data, row);
 		ret = _vte_row_data_get_writable (rowdata, col);
@@ -2092,10 +2095,10 @@ vte_sequence_handler_uc (VteTerminal *terminal, GValueArray *params)
 
 	screen = terminal->pvt->screen;
 	column = screen->cursor_current.col;
-	cell = vte_terminal_find_charcell(terminal, column, screen->cursor_current.row);
+	cell = vte_buffer_find_charcell_writable(terminal->term_pvt->buffer, column, screen->cursor_current.row);
 	while ((cell != NULL) && (cell->attr.fragment) && (column > 0)) {
 		column--;
-		cell = vte_terminal_find_charcell(terminal, column, screen->cursor_current.row);
+                cell = vte_buffer_find_charcell_writable(terminal->term_pvt->buffer, column, screen->cursor_current.row);
 	}
 	if (cell != NULL) {
 		/* Set this character to be underlined. */



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