From a0a223827277126efd8795a0e01fa986163ed2bf Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Fri, 4 Mar 2022 20:46:11 +0900 Subject: [PATCH] termptyops (termpty_cursor_copy): copy entire "cursor_state" --- src/bin/termptyops.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c index cd48ba76..2cb3ae07 100644 --- a/src/bin/termptyops.c +++ b/src/bin/termptyops.c @@ -479,14 +479,12 @@ termpty_cursor_copy(Termpty *ty, Eina_Bool save) { if (save) { - ty->cursor_save[ty->altbuf].cx = ty->cursor_state.cx; - ty->cursor_save[ty->altbuf].cy = ty->cursor_state.cy; + ty->cursor_save[ty->altbuf] = ty->cursor_state; } else { - ty->cursor_state.cx = ty->cursor_save[ty->altbuf].cx; + ty->cursor_state = ty->cursor_save[ty->altbuf]; TERMPTY_RESTRICT_FIELD(ty->cursor_state.cx, 0, ty->w); - ty->cursor_state.cy = ty->cursor_save[ty->altbuf].cy; TERMPTY_RESTRICT_FIELD(ty->cursor_state.cy, 0, ty->h); } }