From 7ee07af081e199759b470eccb1cfae2dd96b286d Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 6 Nov 2018 20:52:02 +0100 Subject: [PATCH] tweaks: reshuffle a couple of conditions, to group things better --- src/winio.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/winio.c b/src/winio.c index 4cc657f3..fb09a94d 100644 --- a/src/winio.c +++ b/src/winio.c @@ -602,15 +602,13 @@ int parse_kbinput(WINDOW *win) return SHIFT_TAB; shift_held = TRUE; } - /* Is Delete pressed together with either Ctrl+Shift or Meta? */ - if (retval == KEY_DC) { - if ((modifiers & 0x05) == 0x05) - return CONTROL_SHIFT_DELETE; - if (modifiers == 0x08) - return ALT_DELETE; - } + /* Are Ctrl and Shift being held while Delete is pressed? */ + if (modifiers == 0x05 && retval == KEY_DC) + return CONTROL_SHIFT_DELETE; /* Is Alt being held? */ if (modifiers == 0x08) { + if (retval == KEY_DC) + return ALT_DELETE; if (retval == KEY_UP) return ALT_UP; if (retval == KEY_DOWN)