Using an DPI of >= 154, it possible for the x_offset to be 0 when a WM_SETTEXT occurs and it loops for quite some time. ;)
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/comctl32/edit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index 10ff5fb..aada9fc 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -1758,7 +1758,8 @@ static void EDIT_EM_ScrollCaret(EDITSTATE *es) if (x < es->format_rect.left) { goal = es->format_rect.left + format_width / HSCROLL_FRACTION; do { - es->x_offset--; + if (es->x_offset) + es->x_offset--; x = (short)LOWORD(EDIT_EM_PosFromChar(es, es->selection_end, FALSE)); } while ((x < goal) && es->x_offset); /* FIXME: use ScrollWindow() somehow to improve performance */