Skip to content
This repository has been archived by the owner on Nov 11, 2018. It is now read-only.

Commit

Permalink
Merge branch 'next-line' into xterm-seq
Browse files Browse the repository at this point in the history
  • Loading branch information
cepko33 committed Aug 31, 2014
2 parents 85fa067 + ab5a9bd commit 64d5dd4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/TerminalOutput.vala
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ public class TerminalOutput : Gee.ArrayList<OutputLine> {
// This code causes a line feed or a new line operation
// TODO: Does LF always imply CR?
move_cursor(cursor_position.line + 1, 0);
terminal.terminal_view.terminal_output_view.add_line_views();
terminal.terminal_view.terminal_output_view.scroll_to_position();
break;

case TerminalStream.StreamElement.ControlSequenceType.HORIZONTAL_TAB:
Expand Down Expand Up @@ -229,6 +231,18 @@ public class TerminalOutput : Gee.ArrayList<OutputLine> {
terminal.terminal_view.terminal_output_view.add_line_views();
break;

case TerminalStream.StreamElement.ControlSequenceType.NEXT_LINE:
screen_offset += 1;
move_cursor(cursor_position.line + stream_element.get_numeric_parameter(0,1), 0);
terminal.terminal_view.terminal_output_view.add_line_views();
break;

case TerminalStream.StreamElement.ControlSequenceType.INDEX:
screen_offset += 1;
move_cursor(cursor_position.line + stream_element.get_numeric_parameter(0,1), cursor_position.column);
terminal.terminal_view.terminal_output_view.add_line_views();
break;

case TerminalStream.StreamElement.ControlSequenceType.CHARACTER_POSITION_RELATIVE:
// The CUF sequence moves the active position to the right.
// The distance moved is determined by the parameter (default: 1)
Expand Down
2 changes: 2 additions & 0 deletions src/TerminalStream.vala
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ public class TerminalStream : Object {
add_esc_sequence_pattern(ControlSequenceType.FORWARD_INDEX, "9");
add_esc_sequence_pattern(ControlSequenceType.APPLICATION_KEYPAD, "=");
add_esc_sequence_pattern(ControlSequenceType.NORMAL_KEYPAD, ">");
add_esc_sequence_pattern(ControlSequenceType.INDEX, "D");
add_esc_sequence_pattern(ControlSequenceType.NEXT_LINE, "E");
add_esc_sequence_pattern(ControlSequenceType.CURSOR_TO_LOWER_LEFT_CORNER_OF_SCREEN, "F");
add_esc_sequence_pattern(ControlSequenceType.FULL_RESET, "c");
add_esc_sequence_pattern(ControlSequenceType.MEMORY_LOCK, "l");
Expand Down

0 comments on commit 64d5dd4

Please sign in to comment.