[vte] widget: Move some methods to VteTerminalPrivate
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] widget: Move some methods to VteTerminalPrivate
- Date: Thu, 14 Jan 2016 16:11:40 +0000 (UTC)
commit 1c5c5b50de8e6688863dc49c0755a509186d93ef
Author: Christian Persch <chpe gnome org>
Date: Thu Jan 14 17:05:35 2016 +0100
widget: Move some methods to VteTerminalPrivate
src/vteinternal.hh | 1 +
src/vteseq.cc | 15 +++++++++------
2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index e7a7397..8675cf1 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -1123,6 +1123,7 @@ public:
inline void set_character_replacements(unsigned slot,
VteCharacterReplacement replacement);
inline void set_character_replacement(unsigned slot);
+ inline void seq_cursor_back_tab();
};
#define m_invalidated_all invalidated_all
diff --git a/src/vteseq.cc b/src/vteseq.cc
index 24a11e6..22f444c 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -1027,17 +1027,20 @@ vte_sequence_handler_bell (VteTerminal *terminal, GValueArray *params)
static void
vte_sequence_handler_cursor_back_tab (VteTerminal *terminal, GValueArray *params)
{
- long newcol;
+ terminal->pvt->seq_cursor_back_tab();
+}
+void
+VteTerminalPrivate::seq_cursor_back_tab()
+{
/* Calculate which column is the previous tab stop. */
- newcol = terminal->pvt->cursor.col;
+ auto newcol = m_cursor.col;
- if (terminal->pvt->tabstops) {
+ if (m_tabstops) {
/* Find the next tabstop. */
while (newcol > 0) {
newcol--;
- if (terminal->pvt->get_tabstop(
- newcol % terminal->pvt->column_count)) {
+ if (get_tabstop(newcol % m_column_count)) {
break;
}
}
@@ -1046,7 +1049,7 @@ vte_sequence_handler_cursor_back_tab (VteTerminal *terminal, GValueArray *params
/* Warp the cursor. */
_vte_debug_print(VTE_DEBUG_PARSE,
"Moving cursor to column %ld.\n", (long)newcol);
- terminal->pvt->cursor.col = newcol;
+ m_cursor.col = newcol;
}
/* Clear from the cursor position (inclusive!) to the beginning of the line. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]