=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: comctl32/edit: Move common calls outside the blocks.

Alexandre Julliard julliard at winehq.org
Thu Aug 23 16:37:03 CDT 2018


Module: wine
Branch: master
Commit: 69ae3898c94b394ffb977fbc0468da382b453d89
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=69ae3898c94b394ffb977fbc0468da382b453d89

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Thu Aug 23 13:55:03 2018 +0300

comctl32/edit: Move common calls outside the blocks.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/edit.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c
index 10ff5fb..f0180ad 100644
--- a/dlls/comctl32/edit.c
+++ b/dlls/comctl32/edit.c
@@ -3308,22 +3308,17 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key)
 				else
 					EDIT_WM_Clear(es);
 			} else {
-				if (shift) {
+				EDIT_EM_SetSel(es, ~0u, 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;




More information about the wine-cvs mailing list