summaryrefslogtreecommitdiff
path: root/ext/io/console/console.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-06 12:47:18 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-06 12:47:18 +0000
commit80b9fb5a7b9b96589d3b096e42af2796b07b560d (patch)
tree883a7b2e41aed0069a77ddb387dbadb9e931ca08 /ext/io/console/console.c
parent1be8c17f0b843d569f463430c8513d38dbccd194 (diff)
* io/console/console.c (winsize_row): should return actual screen
size, not buffer size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/io/console/console.c')
-rw-r--r--ext/io/console/console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index ce0dee40706..af8a1de694d 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -356,7 +356,7 @@ typedef CONSOLE_SCREEN_BUFFER_INFO rb_console_size_t;
#define getwinsize(fd, buf) ( \
GetConsoleScreenBufferInfo((HANDLE)rb_w32_get_osfhandle(fd), (buf)) || \
SET_LAST_ERROR)
-#define winsize_row(buf) (buf)->dwSize.Y
+#define winsize_row(buf) ((buf)->srWindow.Bottom - (buf)->srWindow.Top + 1)
#define winsize_col(buf) (buf)->dwSize.X
#endif