summaryrefslogtreecommitdiff
path: root/src/terminal/fqterm_buffer.cpp
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2014-07-04 22:55:29 +0800
committerIru Cai <mytbk920423@gmail.com>2014-07-04 22:55:29 +0800
commited5c6b000bc032d3584e770a9aff40373af19c2e (patch)
tree0423c582609181255932015718cdb0d1ce78536e /src/terminal/fqterm_buffer.cpp
parent47731af03865c7c1f251a2e6b44ae905d61d083b (diff)
downloadfqterm-ed5c6b000bc032d3584e770a9aff40373af19c2e.tar.xz
Add ANSI sequence "<ESC> c" support
Diffstat (limited to 'src/terminal/fqterm_buffer.cpp')
-rw-r--r--src/terminal/fqterm_buffer.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/terminal/fqterm_buffer.cpp b/src/terminal/fqterm_buffer.cpp
index c00e079..8d7deeb 100644
--- a/src/terminal/fqterm_buffer.cpp
+++ b/src/terminal/fqterm_buffer.cpp
@@ -359,6 +359,26 @@ void FQTermBuffer::setMargins(int top, int bottom) {
}
}
+ // termReset(): deal with ANSI sequence <ESC> c
+ // initialize the terminal property
+ void FQTermBuffer::termReset()
+ {
+ FQ_TRACE("term", 3) << "Resetting terminal (<ESC> c)";
+ top_row_ = 0;
+ bottom_row_ = num_rows_ - 1;
+
+ is_g0_used_ = true;
+ is_insert_mode_ = false;
+ is_ansi_mode_ = true;
+ is_newline_mode_ = false;
+ is_cursor_mode_ = false;
+ is_numeric_mode_ = true;
+ is_origin_mode_ = false;
+ is_autowrap_mode_ = false;
+ is_autorepeat_mode_ = true;
+ is_lightbg_mode_ = false;
+ }
+
void FQTermBuffer::moveCaretTo(int column, int row, bool scroll_if_necessary) {
if (row != caret_.row_)
emit caretChangeRow();