nghung270192 / colorama

Automatically exported from code.google.com/p/colorama
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

bad cursor positioning on subsequent invocations #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Jonathan ,

I've found an issue with your colorama library. On windows, the cursor 
positioning commands do not behave correctly when the viewport moves past the 
top of the buffer. I've attached a demo script to show what I mean (I couldn't 
figure out a way of writing unit tests for this I'm afraid). I've attached a 
patch as well.

Cheers,
Matthew :)

cursor_positioning_issue_demo.py

"""This program should output:
aaa
aba
aaa
On Windows, if you run it repeatedly in the same console window, the 'b' will 
move further and further down as the top corner of the viewport moves further 
and further down in the scrollback. """

import colorama

def main():
    colorama.init()
    print "aaa"
    print "aaa"
    print "aaa"
    print " \x1b[2Ab"

if __name__ == '__main__':
    main()

Original issue reported on code.google.com by tart...@gmail.com on 21 Jan 2014 at 8:18

Attachments:

GoogleCodeExporter commented 9 years ago
reported by Matthew Edwards

Original comment by tart...@gmail.com on 21 Jan 2014 at 8:20

GoogleCodeExporter commented 9 years ago

Original comment by tart...@gmail.com on 21 Jan 2014 at 8:21

GoogleCodeExporter commented 9 years ago
Closing as per Wiggin's comment on https://github.com/tartley/colorama/issues/25

Original comment by tart...@gmail.com on 16 Feb 2015 at 12:07