[vte] emulation: Port ICH to new parameter glue
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] emulation: Port ICH to new parameter glue
- Date: Tue, 27 Mar 2018 17:43:08 +0000 (UTC)
commit e1687cf958dec87df509ecff0bbbabceeb67a783
Author: Christian Persch <chpe src gnome org>
Date: Tue Mar 27 19:40:12 2018 +0200
emulation: Port ICH to new parameter glue
src/vteseq-list.hh | 1 -
src/vteseq.cc | 20 +++++++-------------
2 files changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/src/vteseq-list.hh b/src/vteseq-list.hh
index 5a7b223..1013d22 100644
--- a/src/vteseq-list.hh
+++ b/src/vteseq-list.hh
@@ -51,7 +51,6 @@ SEQUENCE_HANDLER(form_feed)
SEQUENCE_HANDLER(full_reset)
SEQUENCE_HANDLER(index)
SEQUENCE_HANDLER(initiate_hilite_mouse_tracking)
-SEQUENCE_HANDLER(insert_blank_characters)
SEQUENCE_HANDLER(insert_lines)
SEQUENCE_HANDLER(invoke_g1_character_set_as_gr)
SEQUENCE_HANDLER(invoke_g2_character_set)
diff --git a/src/vteseq.cc b/src/vteseq.cc
index 90dc0dc..8f08da5 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -1338,18 +1338,6 @@ VteTerminalPrivate::insert_blank_character()
m_screen->cursor = save;
}
-/* Insert N blank characters. */
-/* TODOegmont: Insert them in a single run, so that we call cleanup_fragments only once. */
-void
-VteTerminalPrivate::seq_insert_blank_characters(vte::parser::Params const& params)
-{
- auto val = std::max(std::min(params.number_or_default_at(0, 1),
- int(m_column_count - m_screen->cursor.col)),
- int(1));
- for (auto i = 0; i < val; i++)
- insert_blank_character();
-}
-
/* REP: Repeat the last graphic character n times. */
void
VteTerminalPrivate::seq_repeat(vte::parser::Params const& params)
@@ -4767,6 +4755,8 @@ VteTerminalPrivate::ICH(vte::parser::Sequence const& seq)
*
* Defaults:
* args[0]: 1
+ *
+ * References: ECMA-48 ยง8.3.64
*/
#if 0
unsigned int num = 1;
@@ -4783,7 +4773,11 @@ VteTerminalPrivate::ICH(vte::parser::Sequence const& seq)
screen->age);
#endif
- seq_insert_blank_characters(seq);
+ auto const count = seq.collect1(0, 1, 1, int(m_column_count - m_screen->cursor.col));
+
+ /* TODOegmont: Insert them in a single run, so that we call cleanup_fragments only once. */
+ for (auto i = 0; i < count; i++)
+ insert_blank_character();
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]