Module: wine Branch: master Commit: 0134e8f7d01d9d73fa63fa3eadfdf7b95801eda9 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=0134e8f7d01d9d73fa63fa3e...
Author: Hippocrates Sendoukas hsendoukas@hotmail.com Date: Sat Sep 2 20:12:06 2006 -0700
riched20: ME_SetSelection -1 to -1 behavior fix.
---
dlls/riched20/caret.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index bdab179..725172d 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -90,6 +90,14 @@ void ME_SetSelection(ME_TextEditor *edit ME_ClearTempStyle(editor); return; } + if (from == -1 && to == -1) /*-1,-1 means put the selection at the end of the text */ + { + editor->pCursors[1].pRun = editor->pCursors[0].pRun = ME_FindItemBack(editor->pBuffer->pLast, diRun); + editor->pCursors[1].nOffset = editor->pCursors[0].nOffset = 0; + ME_InvalidateSelection(editor); + ME_ClearTempStyle(editor); + return; + } if (from == -1) { editor->pCursors[1] = editor->pCursors[0];