[Bug 14250] New: richedit: Deleting text at end of edit control is improperly handled

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Jul 2 17:46:13 CDT 2008


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 at winehq.org
        ReportedBy: dylan.ah.smith at 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.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list