[vte/vte-next: 133/223] Move method to VteBuffer
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next: 133/223] Move method to VteBuffer
- Date: Wed, 22 Jun 2011 20:59:46 +0000 (UTC)
commit beaafeb9e15fb1d849be7ca7c1c57c35a129c0a6
Author: Christian Persch <chpe gnome org>
Date: Thu Jun 9 22:12:55 2011 +0200
Move method to VteBuffer
src/vte-private.h | 2 +-
src/vte.c | 8 ++++----
src/vteseq.c | 12 ++++++++----
3 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/src/vte-private.h b/src/vte-private.h
index 1d7ca53..e4d9e7d 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -442,7 +442,6 @@ gboolean _vte_terminal_insert_char(VteTerminal *terminal, gunichar c,
gboolean invalidate_cells);
void _vte_terminal_scroll_region(VteTerminal *terminal,
long row, glong count, glong delta);
-void _vte_terminal_cleanup_tab_fragments_at_cursor (VteTerminal *terminal);
void _vte_terminal_audible_beep(VteTerminal *terminal);
void _vte_terminal_visible_beep(VteTerminal *terminal);
void _vte_terminal_beep(VteTerminal *terminal);
@@ -482,6 +481,7 @@ void _vte_buffer_clear_tabstops(VteBuffer *buffer);
gboolean _vte_buffer_get_tabstop(VteBuffer *buffer, int column);
void _vte_buffer_set_tabstop(VteBuffer *buffer, int column);
VteRowData *_vte_buffer_ensure_row(VteBuffer *buffer);
+void _vte_buffer_cleanup_tab_fragments_at_cursor (VteBuffer *buffer);
/* private VteScreen methods */
void _vte_screen_set_default_attributes(VteScreen *screen);
diff --git a/src/vte.c b/src/vte.c
index 178beab..fdc6bdf 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -2307,10 +2307,10 @@ vte_terminal_generate_bold(const GdkRGBA *foreground,
/* Cleanup smart-tabs. See vte_sequence_handler_ta() */
void
-_vte_terminal_cleanup_tab_fragments_at_cursor (VteTerminal *terminal)
+_vte_buffer_cleanup_tab_fragments_at_cursor (VteBuffer *buffer)
{
- VteRowData *row = _vte_buffer_ensure_row (terminal->term_pvt->buffer);
- VteScreen *screen = terminal->pvt->screen;
+ VteRowData *row = _vte_buffer_ensure_row (buffer);
+ VteScreen *screen = buffer->pvt->screen;
long col = screen->cursor_current.col;
const VteCell *pcell = _vte_row_data_get (row, col);
@@ -2553,7 +2553,7 @@ _vte_terminal_insert_char(VteTerminal *terminal, gunichar c,
row = vte_buffer_ensure_cursor (terminal->term_pvt->buffer);
g_assert(row != NULL);
- _vte_terminal_cleanup_tab_fragments_at_cursor (terminal);
+ _vte_buffer_cleanup_tab_fragments_at_cursor (terminal->term_pvt->buffer);
if (insert) {
for (i = 0; i < columns; i++)
diff --git a/src/vteseq.c b/src/vteseq.c
index 083b56b..aa59229 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -1134,6 +1134,7 @@ vte_sequence_handler_ce (VteTerminal *terminal, GValueArray *params)
static void
vte_sequence_handler_ch (VteTerminal *terminal, GValueArray *params)
{
+ VteBuffer *buffer = terminal->term_pvt->buffer;
VteScreen *screen;
GValue *value;
long val;
@@ -1148,7 +1149,7 @@ vte_sequence_handler_ch (VteTerminal *terminal, GValueArray *params)
terminal->pvt->column_count - 1);
/* Move the cursor. */
screen->cursor_current.col = val;
- _vte_terminal_cleanup_tab_fragments_at_cursor (terminal);
+ _vte_buffer_cleanup_tab_fragments_at_cursor (buffer);
}
}
}
@@ -1168,6 +1169,7 @@ vte_sequence_handler_cl (VteTerminal *terminal, GValueArray *params)
static void
vte_sequence_handler_cm (VteTerminal *terminal, GValueArray *params)
{
+ VteBuffer *buffer = terminal->term_pvt->buffer;
GValue *row, *col;
long rowval, colval, origin;
VteScreen *screen;
@@ -1199,7 +1201,7 @@ vte_sequence_handler_cm (VteTerminal *terminal, GValueArray *params)
}
screen->cursor_current.row = rowval + screen->insert_delta;
screen->cursor_current.col = colval;
- _vte_terminal_cleanup_tab_fragments_at_cursor (terminal);
+ _vte_buffer_cleanup_tab_fragments_at_cursor (buffer);
}
/* Carriage return. */
@@ -1634,13 +1636,14 @@ vte_sequence_handler_ks (VteTerminal *terminal, GValueArray *params)
static void
vte_sequence_handler_le (VteTerminal *terminal, GValueArray *params)
{
+ VteBuffer *buffer = terminal->term_pvt->buffer;
VteScreen *screen;
screen = terminal->pvt->screen;
if (screen->cursor_current.col > 0) {
/* There's room to move left, so do so. */
screen->cursor_current.col--;
- _vte_terminal_cleanup_tab_fragments_at_cursor (terminal);
+ _vte_buffer_cleanup_tab_fragments_at_cursor (buffer);
} else {
if (terminal->pvt->flags.bw) {
/* Wrap to the previous line. */
@@ -2436,6 +2439,7 @@ vte_sequence_handler_character_attributes (VteTerminal *terminal, GValueArray *p
static void
vte_sequence_handler_cursor_character_absolute (VteTerminal *terminal, GValueArray *params)
{
+ VteBuffer *buffer = terminal->term_pvt->buffer;
VteScreen *screen;
GValue *value;
long val;
@@ -2452,7 +2456,7 @@ vte_sequence_handler_cursor_character_absolute (VteTerminal *terminal, GValueArr
}
screen->cursor_current.col = val;
- _vte_terminal_cleanup_tab_fragments_at_cursor (terminal);
+ _vte_buffer_cleanup_tab_fragments_at_cursor (buffer);
}
/* Move the cursor to the given position, 1-based. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]