diff --git a/src/ansi.c b/src/ansi.c index cfc5d79..5395471 100644 --- a/src/ansi.c +++ b/src/ansi.c @@ -1149,8 +1149,8 @@ static void DoCSI(Window *win, int c, int intermediate) } } else { if (win->w_alt.on) { - LeaveAltScreen(win); RestoreCursor(win, &win->w_alt.cursor); + LeaveAltScreen(win); } } if (a1 == 47 && !i) diff --git a/src/resize.c b/src/resize.c index 9cec1cf..2dee7fb 100644 --- a/src/resize.c +++ b/src/resize.c @@ -800,14 +800,6 @@ static void SwapAltScreen(Window *p) SWAP(width, t); SWAP(height, t); - /* we need to swap cursor positions, but they are not swappable with macro */ - t = p->w_alt.cursor.x; - p->w_alt.cursor.x = p->w_x; - p->w_x = t; - t = p->w_alt.cursor.y; - p->w_alt.cursor.y = p->w_y; - p->w_y = t; - SWAP(histheight, t); SWAP(hlines, ml); SWAP(histidx, t);