diff --git "a/dll/win32/comctl32/edit.c" "b/dll/win32/comctl32/edit.c" index 5185605eb72..79ae36b6fed 100644 --- "a/dll/win32/comctl32/edit.c" +++ "b/dll/win32/comctl32/edit.c" @@ -125,8 +125,6 @@ typedef struct RECT format_rect; INT text_width; /* width of the widest line in pixels for multi line controls and just line width for single line controls */ - INT region_posx; /* Position of cursor relative to region: */ - INT region_posy; /* -1: to left, 0: within, 1: to right */ EDITWORDBREAKPROCW word_break_proc; INT line_count; /* number of lines */ INT y_offset; /* scroll offset in number of lines */ @@ -3495,8 +3493,6 @@ static LRESULT EDIT_WM_LButtonDblClk(EDITSTATE *es) e = li + EDIT_CallWordBreakProc(es, li, e - li, ll, WB_RIGHT); EDIT_EM_SetSel(es, s, e, FALSE); EDIT_EM_ScrollCaret(es); - es->region_posx = es->region_posy = 0; - SetTimer(es->hwndSelf, 0, 100, NULL); return 0; } @@ -3517,8 +3513,6 @@ static LRESULT EDIT_WM_LButtonDown(EDITSTATE *es, DWORD keys, INT x, INT y) e = EDIT_CharFromPos(es, x, y, &after_wrap); EDIT_EM_SetSel(es, (keys & MK_SHIFT) ? es->selection_start : e, e, after_wrap); EDIT_EM_ScrollCaret(es); - es->region_posx = es->region_posy = 0; - SetTimer(es->hwndSelf, 0, 100, NULL); if (!(es->flags & EF_FOCUSED)) SetFocus(es->hwndSelf); @@ -3535,7 +3529,6 @@ static LRESULT EDIT_WM_LButtonDown(EDITSTATE *es, DWORD keys, INT x, INT y) static LRESULT EDIT_WM_LButtonUp(EDITSTATE *es) { if (es->bCaptureState) { - KillTimer(es->hwndSelf, 0); if (GetCapture() == es->hwndSelf) ReleaseCapture(); } es->bCaptureState = FALSE; @@ -3564,7 +3557,6 @@ static LRESULT EDIT_WM_MouseMove(EDITSTATE *es, INT x, INT y) { INT e; BOOL after_wrap; - INT prex, prey; /* If the mouse has been captured by process other than the edit control itself, * the windows edit controls will not select the strings with mouse move. @@ -3572,17 +3564,10 @@ static LRESULT EDIT_WM_MouseMove(EDITSTATE *es, INT x, INT y) if (!es->bCaptureState || GetCapture() != es->hwndSelf) return 0; - /* - * FIXME: gotta do some scrolling if outside client - * area. Maybe reset the timer ? - */ - prex = x; prey = y; - EDIT_ConfinePoint(es, &x, &y); - es->region_posx = (prex < x) ? -1 : ((prex > x) ? 1 : 0); - es->region_posy = (prey < y) ? -1 : ((prey > y) ? 1 : 0); e = EDIT_CharFromPos(es, x, y, &after_wrap); EDIT_EM_SetSel(es, es->selection_start, e, after_wrap); EDIT_SetCaretPos(es,es->selection_end,es->flags & EF_AFTER_WRAP); + EDIT_EM_ScrollCaret(es); return 0; } @@ -3977,24 +3962,6 @@ static LRESULT EDIT_WM_SysKeyDown(EDITSTATE *es, INT key, DWORD key_data) } -/********************************************************************* - * - * WM_TIMER - * - */ -static void EDIT_WM_Timer(EDITSTATE *es) -{ - if (es->region_posx < 0) { - EDIT_MoveBackward(es, TRUE); - } else if (es->region_posx > 0) { - EDIT_MoveForward(es, TRUE); - } -/* - * FIXME: gotta do some vertical scrolling here, like - * EDIT_EM_LineScroll(hwnd, 0, 1); - */ -} - /********************************************************************* * * WM_HSCROLL @@ -5019,10 +4986,6 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR result = EDIT_WM_SysKeyDown(es, (INT)wParam, (DWORD)lParam); break; - case WM_TIMER: - EDIT_WM_Timer(es); - break; - case WM_VSCROLL: result = EDIT_WM_VScroll(es, LOWORD(wParam), (short)HIWORD(wParam)); break;