summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorQC <qball@gmpclient.org>2014-11-29 16:54:42 +0100
committerQC <qball@gmpclient.org>2014-11-29 16:54:42 +0100
commite2a3139b7dd02021a9ec2d523e436a98ef83c189 (patch)
treef6a338764c05970d5caa36ea72b15ac82f195c01 /source
parent6805d93f68b1b3241d4c939804990025f88546e3 (diff)
Small update trying to fix past commit.
Diffstat (limited to 'source')
-rw-r--r--source/rofi.c10
-rw-r--r--source/textbox.c2
2 files changed, 8 insertions, 4 deletions
diff --git a/source/rofi.c b/source/rofi.c
index 5fa89ffc..486eb5e1 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -1652,14 +1652,18 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
// If a valid item is selected, return that..
if ( state.selected < state.filtered_lines && state.filtered[state.selected] != NULL ) {
*( state.selected_line ) = state.line_map[state.selected];
- if ( strlen( state.text->text ) > 0 && rc == -2 ) {
+ if ( strlen ( state.text->text ) > 0 && rc == -2 ) {
state.retv = MENU_CUSTOM_INPUT;
- } else {
+ }
+ else {
state.retv = MENU_OK;
}
}
- // Nothing entered and nothing selected.
+ else if ( rc == -2 ) {
+ state.retv = MENU_CUSTOM_INPUT;
+ }
else{
+ // Nothing entered and nothing selected.
state.retv = MENU_CANCEL;
}
diff --git a/source/textbox.c b/source/textbox.c
index 5228672f..b8e9777c 100644
--- a/source/textbox.c
+++ b/source/textbox.c
@@ -405,7 +405,7 @@ int textbox_keypress ( textbox *tb, XEvent *ev )
textbox_cursor_bkspc ( tb );
return 1;
}
- else if ( ( ev->xkey.state & ControlMask ) && ( key == XK_Return || key == XK_KP_Enter) ) {
+ else if ( ( ev->xkey.state & ControlMask ) && ( key == XK_Return || key == XK_KP_Enter ) ) {
return -2;
}
else if ( key == XK_Return || key == XK_KP_Enter ||