if one entry as input and autoselect enabled return immediately
This commit is contained in:
Dave Davenport 2016-02-17 08:44:51 +01:00
parent d4d7ed70c2
commit 99515f986e
2 changed files with 6 additions and 0 deletions

View file

@ -5,6 +5,8 @@
- Blinking cursor.
- Config file.
- Add history to DRun mode. (#343)
Improvements:
- auto-select and single item on dmenu (#281)
Bug fixes:
- Fix subpixel rendering. (#303)
- Fix basic tests on OpenBSD (#272)

View file

@ -379,6 +379,10 @@ int dmenu_switcher_dialog ( void )
return TRUE;
}
}
if ( config.auto_select && cmd_list_length == 1 ) {
dmenu_output_formatted_line ( pd->format, cmd_list[0], 0, config.filter );
return TRUE;
}
if ( find_arg ( "-password" ) >= 0 ) {
menu_flags |= MENU_PASSWORD;
}