comctl32/edit: Move common calls outside the blocks.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2018-08-23 13:55:03 +03:00 committed by Alexandre Julliard
parent a1e2c7fd2f
commit 69ae3898c9
1 changed files with 5 additions and 10 deletions

View File

@ -3308,22 +3308,17 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key)
else else
EDIT_WM_Clear(es); EDIT_WM_Clear(es);
} else { } else {
if (shift) { EDIT_EM_SetSel(es, ~0u, 0, FALSE);
if (shift)
/* delete character left of caret */ /* delete character left of caret */
EDIT_EM_SetSel(es, (UINT)-1, 0, FALSE);
EDIT_MoveBackward(es, TRUE); EDIT_MoveBackward(es, TRUE);
EDIT_WM_Clear(es); else if (control)
} else if (control) {
/* delete to end of line */ /* delete to end of line */
EDIT_EM_SetSel(es, (UINT)-1, 0, FALSE);
EDIT_MoveEnd(es, TRUE, FALSE); EDIT_MoveEnd(es, TRUE, FALSE);
EDIT_WM_Clear(es); else
} else {
/* delete character right of caret */ /* delete character right of caret */
EDIT_EM_SetSel(es, (UINT)-1, 0, FALSE);
EDIT_MoveForward(es, TRUE); EDIT_MoveForward(es, TRUE);
EDIT_WM_Clear(es); EDIT_WM_Clear(es);
}
} }
} }
break; break;