tkuehl / pgu

Automatically exported from code.google.com/p/pgu
0 stars 0 forks source link

gui.textarea.TextArea sets the editor caret at eol - 1 #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. This requires the previous fix to TextArea so it doesn't raise IndexError.
2.
    t = gui.Table()
    t.tr()
    t.td(gui.TextArea(value=''))
3. Focus the text area and type characters to see the bug.

What is the expected output? What do you see instead?
Characters should append to line. Instead they insert at eol - 1.

What version of the product are you using? On what operating system?
pgu 0.14, pygame 1.9.1, Python 2.6.6, Windows 7.

Please provide any additional information below.
To fix this change the following line in TextArea.setCursorByHVPos():
##                if ( self.hpos >= len(line) ):
                if ( self.hpos > len(line) ):

Original issue reported on code.google.com by stabbing...@gmail.com on 28 Jan 2011 at 3:35

GoogleCodeExporter commented 8 years ago
Closing this ticket since you've included this change in a recent patch. Thanks!

Original comment by peter.ro...@gmail.com on 6 Mar 2011 at 9:35