aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-10-12 20:17:50 +0200
committerBoris Faure <billiob@gmail.com>2018-10-12 20:17:50 +0200
commitaa0f968860be513164bf41dfd4107a1bb37344b8 (patch)
tree90b716df1313578fb63ee8d5319f35034913d1f7 /src
parentselection: handle scrolling and left/right margins (diff)
downloadterminology-1.2.tar.gz
termpty: soft reset should only reset attributesterminology-1.2
Diffstat (limited to 'src')
-rw-r--r--src/bin/termptyesc.c2
-rw-r--r--src/bin/termptyops.c14
-rw-r--r--src/bin/termptyops.h1
3 files changed, 12 insertions, 5 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index ee9aa98..fc0afca 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -1629,7 +1629,7 @@ HVP:
if (b && *b == '!')
{
DBG("soft reset (DECSTR)");
- termpty_reset_state(ty);
+ termpty_soft_reset_state(ty);
}
else
{
diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c
index dc66add..a2e1423 100644
--- a/src/bin/termptyops.c
+++ b/src/bin/termptyops.c
@@ -424,7 +424,7 @@ termpty_reset_att(Termatt *att)
}
void
-termpty_reset_state(Termpty *ty)
+termpty_soft_reset_state(Termpty *ty)
{
int i;
Config *config = NULL;
@@ -432,8 +432,6 @@ termpty_reset_state(Termpty *ty)
if (ty->obj)
config = termio_config_get(ty->obj);
- ty->cursor_state.cx = 0;
- ty->cursor_state.cy = 0;
ty->termstate.top_margin = 0;
ty->termstate.bottom_margin = 0;
ty->termstate.left_margin = 0;
@@ -465,7 +463,6 @@ termpty_reset_state(Termpty *ty)
ty->mouse_ext = MOUSE_EXT_NONE;
ty->bracketed_paste = 0;
- termpty_clear_backlog(ty);
termpty_clear_tabs_on_screen(ty);
for (i = 0; i < ty->w; i += TAB_WIDTH)
{
@@ -476,6 +473,15 @@ termpty_reset_state(Termpty *ty)
}
void
+termpty_reset_state(Termpty *ty)
+{
+ termpty_soft_reset_state(ty);
+ ty->cursor_state.cx = 0;
+ ty->cursor_state.cy = 0;
+ termpty_clear_backlog(ty);
+}
+
+void
termpty_cursor_copy(Termpty *ty, Eina_Bool save)
{
if (save)
diff --git a/src/bin/termptyops.h b/src/bin/termptyops.h
index ee27860..48cbc0a 100644
--- a/src/bin/termptyops.h
+++ b/src/bin/termptyops.h
@@ -24,6 +24,7 @@ void termpty_clear_screen(Termpty *ty, Termpty_Clear mode);
void termpty_clear_all(Termpty *ty);
void termpty_reset_att(Termatt *att);
void termpty_reset_state(Termpty *ty);
+void termpty_soft_reset_state(Termpty *ty);
void termpty_cursor_copy(Termpty *ty, Eina_Bool save);
void termpty_clear_tabs_on_screen(Termpty *ty);
void termpty_clear_backlog(Termpty *ty);