Commit 0134e8f7 authored by Hippocrates Sendoukas's avatar Hippocrates Sendoukas Committed by Alexandre Julliard

riched20: ME_SetSelection -1 to -1 behavior fix.

parent 382d0679
......@@ -90,6 +90,14 @@ void ME_SetSelection(ME_TextEditor *editor, int from, int to)
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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment