[vte] emulation: Port VPA to new parameter glue
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] emulation: Port VPA to new parameter glue
- Date: Tue, 27 Mar 2018 17:42:38 +0000 (UTC)
commit 8f223ebdd619846f2f9c1f04c3888eabecde67a6
Author: Christian Persch <chpe src gnome org>
Date: Tue Mar 27 19:40:12 2018 +0200
emulation: Port VPA to new parameter glue
src/vteseq-list.hh | 1 -
src/vteseq.cc | 17 +++++------------
2 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/src/vteseq-list.hh b/src/vteseq-list.hh
index de0382c..10965c4 100644
--- a/src/vteseq-list.hh
+++ b/src/vteseq-list.hh
@@ -69,7 +69,6 @@ SEQUENCE_HANDLER(invoke_g3_character_set_as_gr)
SEQUENCE_HANDLER(iterm2_133)
SEQUENCE_HANDLER(iterm2_1337)
SEQUENCE_HANDLER(line_feed)
-SEQUENCE_HANDLER(line_position_absolute)
SEQUENCE_HANDLER(linux_console_cursor_attributes)
SEQUENCE_HANDLER(media_copy)
SEQUENCE_HANDLER(memory_lock)
diff --git a/src/vteseq.cc b/src/vteseq.cc
index 432e2f5..f2b67ea 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -1240,17 +1240,6 @@ VteTerminalPrivate::seq_cursor_preceding_line(vte::parser::Params const& params)
seq_cursor_up(params);
}
-/* Move the cursor to the given row (vertical position), 1-based. */
-void
-VteTerminalPrivate::seq_line_position_absolute(vte::parser::Params const& params)
-{
- // FIXMEchpe shouldn't we ensure_cursor_is_onscreen AFTER setting the new cursor row?
- ensure_cursor_is_onscreen();
-
- auto val = params.number_or_default_at(0, 1) - 1;
- set_cursor_row(val);
-}
-
/* Delete a character at the current cursor position. */
void
VteTerminalPrivate::delete_character()
@@ -5555,7 +5544,11 @@ VteTerminalPrivate::VPA(vte::parser::Sequence const& seq)
screen_cursor_set_rel(screen, screen->state.cursor_x, pos - 1);
#endif
- seq_line_position_absolute(seq);
+ // FIXMEchpe shouldn't we ensure_cursor_is_onscreen AFTER setting the new cursor row?
+ ensure_cursor_is_onscreen();
+
+ auto value = seq.collect1(0, 1, 1, m_row_count);
+ set_cursor_row1(value);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]