Fix vertical scrolling of edit control

Henry Kroll III henry at comptune.com
Sat Mar 20 05:53:06 CDT 2010


Fixes annoying text selection creep in Notepad and other programs using
the edit control when the mouse moves outside the window.
-------------- next part --------------
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index 9898bc4..08d00d6 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -3791,24 +3791,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
  *
  */
@@ -4056,6 +4038,17 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos)
 
 /*********************************************************************
  *
+ *	WM_TIMER
+ *
+ */
+static void EDIT_WM_Timer(EDITSTATE *es)
+{
+    if (es->region_posy < 0)EDIT_WM_VScroll(es,SB_LINEUP,0);
+    else if (es->region_posy > 0)EDIT_WM_VScroll(es,SB_LINEDOWN,0);
+}
+
+/*********************************************************************
+ *
  *	EM_GETTHUMB
  *
  *	FIXME: is this right ?  (or should it be only VSCROLL)


More information about the wine-patches mailing list