1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-11-06 22:54:53 -05:00

Fix last commit, make difference between enter and escaped

This commit is contained in:
QC 2014-01-20 20:49:26 +01:00
parent 164073ffd3
commit 22399d0fae

View file

@ -1104,13 +1104,17 @@ int menu( char **lines, char **input, char *prompt, int selected, Time *time, in
release_keyboard();
if ( chosen && filtered[selected] )
if ( chosen && filtered[selected] ) {
line = line_map[selected];
}
if ( line < 0 && input ) {
if ( *input != NULL ) free( *input );
*input = strdup( text->text );
// If chosen and the like.
if(chosen)
line = -3;
}
@ -1368,7 +1372,7 @@ void run_switcher( int fmode )
mode = WINDOW_SWITCHER;
} else if ( n >=0 && cmd_list[n] != NULL ) {
exec_cmd( cmd_list[n], shift );
} else if ( n == -1 ) {
} else if ( n == -3 && input != NULL && input[0] != '\0' ) {
exec_cmd( input, shift );
}