Workaround for Issue 1401 - the progress bar cannot display the last character on windows

This commit is contained in:
Thomas Nagy 2014-01-25 02:02:28 +01:00
parent d413616400
commit c395bffed8
2 changed files with 3 additions and 2 deletions

View File

@ -40,7 +40,7 @@ colors_lst = {
'cursor_off' :'\x1b[?25l',
}
indicator = '\x1b[K%s%s%s\r'
indicator = '\r\x1b[K%s%s%s'
def enable_colors(use):
if use == 1:

View File

@ -294,7 +294,8 @@ else:
sbinfo = CONSOLE_SCREEN_BUFFER_INFO()
def get_term_cols():
windll.kernel32.GetConsoleScreenBufferInfo(console, byref(sbinfo))
return sbinfo.Size.X
# TODO Issue 1401
return sbinfo.Size.X - 1
# just try and see
try: