windows console formatting fix

This commit is contained in:
Jack Andersen 2015-09-09 20:19:32 -10:00
parent d133a8cdd4
commit 2db10ad60a
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ static inline int ConsoleWidth()
#if _WIN32 #if _WIN32
CONSOLE_SCREEN_BUFFER_INFO info; CONSOLE_SCREEN_BUFFER_INFO info;
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &info); GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &info);
retval = info.dwSize.X; retval = info.dwSize.X - 1;
#else #else
struct winsize w; struct winsize w;
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1) if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1)