http://bugs.winehq.org/show_bug.cgi?id=14250
Summary: richedit: Deleting text at end of edit control is improperly handled Product: Wine Version: CVS/GIT Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: richedit AssignedTo: wine-bugs@winehq.org ReportedBy: dylan.ah.smith@gmail.com
The following steps will show the bug: 1. Open Wine's Wordpad 2. Enter plenty of lines of text so that the vertical scrollbar appears (extra lines are fine, and typing the line number for each line makes it easier to see what is happening). 3. Move the cursor to the end of the text 4. Press enter followed by backspace
Builtin Result: The second last line will be repeated twice at the end until the control is repainted by doings something like minimizing and restoring the window.
Native Result: The text will not be scrolled despite the fact that the end of the text is before the end of the control, and more text remains invisible because of the scroll position.
Notes: - Lines don't need to be deleted at the end of the text, as long as you scroll to the end of the text. - It doesn't matter how the text is entered or deleted, so instead of hitting backspace on the last step feel free to move the cursor back and press the delete key, select with the mouse and cut, or undo.
Wine seems to avoid having the scroll position so that there is extra space at the end of the control when there is enough text to fill the control, but native seems to allow this extra space to be shown. This is probably done like this in Wine because scrolling manually with the mouse wheel or using the scrollbar control doesn't allow the scroll position to be this far down.
I modified wordpad's status bar to print the scroll info via GetScrollInfo and noticed that nPos and nMax increase and decrease with native richedit controls when I add lines and remove lines to the end of the text without causing the richedit control to seem to scroll. This might indicate that a copy of SCROLLINFO.nPos might be stored in the richedit control.
This can be further shown with the following steps: 1. Open Wine's Wordpad 2. Enter plenty of lines of text. More than enough to cause the vertical scrollbar to shown. 3. Move the cursor to the end of the text. 4. Increase the height of the window to increase the height of the richedit control.
Builtin result: The text will be scrolled down so the end of the text is at the end of the richedit control.
Native result: The text will remain in the same place, with extra space left at the end of the control, until the richedit control is resized to be large enough to show all the text. Once all the text can be displayed the scrollbar will disappear, and start of the text will be at the top of the control.
I hope this is detailed enough, if not let me know which steps are not clear enough to reproduce this.
I tested this on Windows and in Ubuntu 8.04 with native and builtin riched20.dll on both platforms.
http://bugs.winehq.org/show_bug.cgi?id=14250
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |dylan.ah.smith@gmail.com Status|NEW |ASSIGNED
--- Comment #1 from Dylan Smith dylan.ah.smith@gmail.com 2008-09-17 21:07:23 --- Created an attachment (id=16148) --> (http://bugs.winehq.org/attachment.cgi?id=16148) richedit: Handle deletion at the end of text properly.
Alex Villacís Lasso fixed a scrolling related bug by storing an internal copy of the scroll area and page size. Thanks to his work, this bug is a lot easier to fix, since I just needed to also use an internal copy of the scroll position.
http://bugs.winehq.org/show_bug.cgi?id=14250
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
http://bugs.winehq.org/show_bug.cgi?id=14250
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED
--- Comment #2 from Dylan Smith dylan.ah.smith@gmail.com 2008-09-18 08:42:08 --- fixed by commit da058cbf6715aa96ef400fa7b59d9c5349e740ab richedit: Handle deletion at the end of text properly.
http://bugs.winehq.org/show_bug.cgi?id=14250
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org 2008-09-19 11:17:30 --- Closing bugs fixed in 1.1.5.
http://bugs.winehq.org/show_bug.cgi?id=14250
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified