diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-09-04 10:45:54 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-09-04 10:45:54 +0000 |
commit | 29ebba7050c13a958f7ec44ce11f8b6e217b4701 (patch) | |
tree | cb8b3fe683aa949f7a42991ebecd339a521307dd /winsup/cygwin/fhandler_console.cc | |
parent | f90e39b55e112ba76f304f7e164bd60f25433285 (diff) | |
download | cygnal-29ebba7050c13a958f7ec44ce11f8b6e217b4701.tar.gz cygnal-29ebba7050c13a958f7ec44ce11f8b6e217b4701.tar.bz2 cygnal-29ebba7050c13a958f7ec44ce11f8b6e217b4701.zip |
2001-09-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* fhandler_console.cc (fhandler_console::char_command): Save the cursor
position relative to the top of the window.
* fhandler_cc (fhandler_console::write): Ditto.
Diffstat (limited to 'winsup/cygwin/fhandler_console.cc')
-rw-r--r-- | winsup/cygwin/fhandler_console.cc | 6 |
1 files changed, 4 insertions, 2 deletions
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') |