EM_SETSEL scrolls if outside of the visible range.
"shift+home" selection improved in the edit control.
This commit is contained in:
parent
7b246b88a2
commit
dde4d61f5a
|
@ -358,6 +358,7 @@ LRESULT WINAPI EditWndProc( HWND hwnd, UINT msg,
|
|||
case EM_SETSEL:
|
||||
DPRINTF_EDIT_MSG32("EM_SETSEL");
|
||||
EDIT_EM_SetSel(wnd, es, wParam, lParam, FALSE);
|
||||
EDIT_EM_ScrollCaret(wnd, es);
|
||||
result = 1;
|
||||
break;
|
||||
|
||||
|
@ -1509,7 +1510,7 @@ static void EDIT_MoveHome(WND *wnd, EDITSTATE *es, BOOL extend)
|
|||
HIWORD(EDIT_EM_PosFromChar(wnd, es, es->selection_end, es->flags & EF_AFTER_WRAP)), NULL);
|
||||
else
|
||||
e = 0;
|
||||
EDIT_EM_SetSel(wnd, es, e, extend ? es->selection_start : e, FALSE);
|
||||
EDIT_EM_SetSel(wnd, es, extend ? es->selection_start : e, e, FALSE);
|
||||
EDIT_EM_ScrollCaret(wnd, es);
|
||||
}
|
||||
|
||||
|
@ -3039,7 +3040,11 @@ static LRESULT EDIT_WM_Create(WND *wnd, EDITSTATE *es, LPCREATESTRUCTA cs)
|
|||
|
||||
if (cs->lpszName && *(cs->lpszName) != '\0') {
|
||||
EDIT_EM_ReplaceSel(wnd, es, FALSE, cs->lpszName);
|
||||
/* if we insert text to the editline, the text scrolls out of the window, as the caret is placed after the insert pos normally; thus we reset es->selection... to 0 and update caret */
|
||||
/* if we insert text to the editline, the text scrolls out
|
||||
* of the window, as the caret is placed after the insert
|
||||
* pos normally; thus we reset es->selection... to 0 and
|
||||
* update caret
|
||||
*/
|
||||
es->selection_start = es->selection_end = 0;
|
||||
EDIT_EM_ScrollCaret(wnd, es);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue