From 2343efd6a13606ad05a61f30adcbb284b3c464f5 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Mon, 21 Aug 2017 23:13:30 +0200 Subject: [PATCH] termptyesc: clearing the screen (from ED2) should not reset bottom margin Thanks to @ncim for the report. --- src/bin/termptyesc.c | 6 +++--- src/bin/termptyops.c | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index a51eb2c..a62e823 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -1245,9 +1245,9 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce) DBG("ED/DECSED %d: erase in display", arg); switch (arg) { - case TERMPTY_CLR_END: - case TERMPTY_CLR_BEGIN: - case TERMPTY_CLR_ALL: + case TERMPTY_CLR_END /* 0 */: + case TERMPTY_CLR_BEGIN /* 1 */: + case TERMPTY_CLR_ALL /* 2 */: termpty_clear_screen(ty, arg); break; case 3: diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c index 774a885..4a00588 100644 --- a/src/bin/termptyops.c +++ b/src/bin/termptyops.c @@ -371,7 +371,6 @@ termpty_clear_screen(Termpty *ty, Termpty_Clear mode) case TERMPTY_CLR_ALL: ty->circular_offset = 0; termpty_cells_clear(ty, ty->screen, ty->w * ty->h); - ty->termstate.bottom_margin = 0; if (ty->cb.cancel_sel.func) ty->cb.cancel_sel.func(ty->cb.cancel_sel.data); break;