From ebfec243916a01167071282305dab39d8d45418d Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 10 Mar 2014 17:33:17 +0000 Subject: [PATCH] * fhandler_console.cc (dev_console::save_restore): Save entire line of current cursor position. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_console.cc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f96e0e1a6..0d3c5cc8b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2014-03-10 Christopher Faylor + + * fhandler_console.cc (dev_console::save_restore): Save entire line of + current cursor position. + 2014-03-09 Christopher Faylor * fhandler_console.cc (fhandler_console::save_restore): Save only until diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 53418edf1..ffbda4813 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1457,8 +1457,9 @@ dev_console::save_restore (HANDLE h, char c) if (c == 'h') /* save */ { fillin (h); - save_bufsize.Y = dwEnd.Y + 1; /* Assume starting from 0/0 */ save_bufsize.X = b.dwSize.X; + if ((save_bufsize.Y = dwEnd.Y + 2) > b.dwSize.Y) + save_bufsize.X = b.dwSize.Y; if (save_buf) cfree (save_buf);