From 29ebba7050c13a958f7ec44ce11f8b6e217b4701 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 4 Sep 2001 10:45:54 +0000 Subject: 2001-09-04 Kazuhiro Fujieda * fhandler_console.cc (fhandler_console::char_command): Save the cursor position relative to the top of the window. * fhandler_cc (fhandler_console::write): Ditto. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/fhandler_console.cc | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ca4461632..350b894fd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2001-09-04 Kazuhiro Fujieda + + * fhandler_console.cc (fhandler_console::char_command): Save the cursor + position relative to the top of the window. + * fhandler_cc (fhandler_console::write): Ditto. + Mon Sep 3 21:06:00 2001 Corinna Vinschen * dir.cc (opendir): Write version information to __d_dirent->d_version. diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 1b3b0270c..9bb6c0911 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1306,9 +1306,10 @@ fhandler_console::char_command (char c) break; case 's': /* Save cursor position */ cursor_get (&savex, &savey); + savey -= info.winTop; break; case 'u': /* Restore cursor position */ - cursor_set (FALSE, savex, savey); + cursor_set (TRUE, savex, savey); break; case 'I': /* TAB */ cursor_get (&x, &y); @@ -1543,12 +1544,13 @@ fhandler_console::write (const void *vsrc, size_t len) } else if (*src == '8') /* Restore cursor position */ { - cursor_set (FALSE, savex, savey); + cursor_set (TRUE, savex, savey); state_ = normal; } else if (*src == '7') /* Save cursor position */ { cursor_get (&savex, &savey); + savey -= info.winTop; state_ = normal; } else if (*src == 'R') -- cgit v1.2.3