Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com ---
v2: Move more stuff outside the blocks and use ~0
This supersedes 150051.
dlls/user32/edit.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 96ecbec..0761938 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -3474,22 +3474,17 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key) else EDIT_WM_Clear(es); } else { - if (shift) { + EDIT_EM_SetSel(es, ~0, 0, FALSE); + if (shift) /* delete character left of caret */ - EDIT_EM_SetSel(es, (UINT)-1, 0, FALSE); EDIT_MoveBackward(es, TRUE); - EDIT_WM_Clear(es); - } else if (control) { + else if (control) /* delete to end of line */ - EDIT_EM_SetSel(es, (UINT)-1, 0, FALSE); EDIT_MoveEnd(es, TRUE, FALSE); - EDIT_WM_Clear(es); - } else { + else /* delete character right of caret */ - EDIT_EM_SetSel(es, (UINT)-1, 0, FALSE); EDIT_MoveForward(es, TRUE); - EDIT_WM_Clear(es); - } + EDIT_WM_Clear(es); } } break;