Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-09-04 14:45:54 +0400
committerCorinna Vinschen <corinna@vinschen.de>2001-09-04 14:45:54 +0400
commit29ebba7050c13a958f7ec44ce11f8b6e217b4701 (patch)
treecb8b3fe683aa949f7a42991ebecd339a521307dd /winsup/cygwin/fhandler_console.cc
parentf90e39b55e112ba76f304f7e164bd60f25433285 (diff)
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.cc6
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')