richedit: Made sure the caret position is stored when moving up/down
dylan.ah.smith at gmail.com
Fri Jul 4 14:30:51 CDT 2008
The caret's x position is stored in ME_TextEditor.nUDArrowX so that when
the caret is moved up or down, it will stay along the same horizontal
position, or at the end of a line. Unfortunately, the value stored in
nUDArrowX was being unconditionally discarded in ME_ArrowKey, preventing
it from serving its purpose.
To test the bug mentioned above:
1. Open Wine's wordpad
2. Enter some lines of text with an empty line between them
3. Move the cursor to the end of a line with text
4. Use the up or down arrow keys to move past the empty line.
Previously this will result in the caret staying at the start of the
line after moving past the empty line.
This patch fixes this issue by only conditionally discarding the
nUDArrowX value so that it is preserved during up and down
dlls/riched20/caret.c | 1 -
dlls/riched20/editor.c | 9 +++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the wine-patches