[vte] emulation: Move sequence handler code directly into the handler
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] emulation: Move sequence handler code directly into the handler
- Date: Tue, 27 Mar 2018 17:43:38 +0000 (UTC)
commit 15e9df6f359deb6b670eb714f74775e6e9b8fd93
Author: Christian Persch <chpe src gnome org>
Date: Tue Mar 27 19:40:12 2018 +0200
emulation: Move sequence handler code directly into the handler
src/vteseq-list.hh | 2 --
src/vteseq.cc | 24 ++++++++----------------
2 files changed, 8 insertions(+), 18 deletions(-)
---
diff --git a/src/vteseq-list.hh b/src/vteseq-list.hh
index 6986057..6b8434b 100644
--- a/src/vteseq-list.hh
+++ b/src/vteseq-list.hh
@@ -4,7 +4,6 @@ SEQUENCE_HANDLER(ansi_conformance_level_3)
SEQUENCE_HANDLER(application_keypad)
SEQUENCE_HANDLER(backspace)
SEQUENCE_HANDLER(bell)
-SEQUENCE_HANDLER(carriage_return)
SEQUENCE_HANDLER(change_background_color_bel)
SEQUENCE_HANDLER(change_background_color_st)
SEQUENCE_HANDLER(change_color_bel)
@@ -56,7 +55,6 @@ SEQUENCE_HANDLER(invoke_g3_character_set)
SEQUENCE_HANDLER(invoke_g3_character_set_as_gr)
SEQUENCE_HANDLER(iterm2_133)
SEQUENCE_HANDLER(iterm2_1337)
-SEQUENCE_HANDLER(line_feed)
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 4b2feca..1b85ac1 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -1136,13 +1136,6 @@ VteTerminalPrivate::set_cursor_coords1(vte::grid::row_t row,
set_cursor_row1(row);
}
-/* Carriage return. */
-void
-VteTerminalPrivate::seq_carriage_return(vte::parser::Params const& params)
-{
- set_cursor_column(0);
-}
-
/* Delete a character at the current cursor position. */
void
VteTerminalPrivate::delete_character()
@@ -1393,13 +1386,6 @@ VteTerminalPrivate::seq_reset_color(vte::parser::Params const& params)
}
}
-/* Cursor down 1 line, with scrolling. */
-void
-VteTerminalPrivate::seq_line_feed(vte::parser::Params const& params)
-{
- line_feed();
-}
-
void
VteTerminalPrivate::line_feed()
{
@@ -2693,13 +2679,15 @@ VteTerminalPrivate::CR(vte::parser::Sequence const& seq)
/*
* CR - carriage-return
* Move the cursor to the left margin on the current line.
+ *
+ * References: ECMA-48 § 8.3.15
*/
#if 0
screen_cursor_clear_wrap(screen);
screen_cursor_set(screen, 0, screen->state.cursor_y);
#endif
- seq_carriage_return(seq);
+ set_cursor_column(0);
}
void
@@ -4747,6 +4735,10 @@ VteTerminalPrivate::LF(vte::parser::Sequence const& seq)
{
/*
* LF - line-feed
+ * Causes a line feed or a new line operation, depending on the setting
+ * of line feed/new line mode.
+ *
+ * References: ECMA-48 § 8.3.74
*/
#if 0
@@ -4755,7 +4747,7 @@ VteTerminalPrivate::LF(vte::parser::Sequence const& seq)
screen_cursor_left(screen, screen->state.cursor_x);
#endif
- seq_line_feed(seq);
+ line_feed();
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]