mirror of https://github.com/davatorium/rofi.git
Possible fix issue #175
This commit is contained in:
parent
95beb58730
commit
e5caaf9d1a
|
@ -262,30 +262,31 @@ int dmenu_switcher_dialog ( char **input )
|
||||||
}
|
}
|
||||||
// We normally do not want to restart the loop.
|
// We normally do not want to restart the loop.
|
||||||
restart = FALSE;
|
restart = FALSE;
|
||||||
if ( ( mretv & ( MENU_OK | MENU_CUSTOM_INPUT ) ) && list[selected_line] != NULL ) {
|
// Normal mode
|
||||||
if ( ( mretv & MENU_CUSTOM_INPUT ) ) {
|
if ( ( mretv & MENU_OK ) && list[selected_line] != NULL ) {
|
||||||
dmenu_output_formatted_line ( format, *input, -1, *input );
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
dmenu_output_formatted_line ( format, list[selected_line], selected_line, *input );
|
dmenu_output_formatted_line ( format, list[selected_line], selected_line, *input );
|
||||||
}
|
|
||||||
if ( ( mretv & MENU_SHIFT ) ) {
|
if ( ( mretv & MENU_SHIFT ) ) {
|
||||||
restart = TRUE;
|
restart = TRUE;
|
||||||
// Move to next line.
|
// Move to next line.
|
||||||
selected_line = MIN ( next_pos, length - 1 );
|
selected_line = MIN ( next_pos, length - 1 );
|
||||||
}
|
}
|
||||||
retv = TRUE;
|
retv = TRUE;
|
||||||
if ( ( mretv & MENU_QUICK_SWITCH ) ) {
|
// Custom input
|
||||||
|
}
|
||||||
|
else if ( ( mretv & ( MENU_CUSTOM_INPUT ) ) ) {
|
||||||
|
dmenu_output_formatted_line ( format, *input, -1, *input );
|
||||||
|
retv = TRUE;
|
||||||
|
}
|
||||||
|
// Quick switch with entry selected.
|
||||||
|
else if ( ( mretv & MENU_QUICK_SWITCH ) && selected_line > 0 ) {
|
||||||
|
dmenu_output_formatted_line ( format, list[selected_line], selected_line, *input );
|
||||||
|
|
||||||
|
restart = FALSE;
|
||||||
retv = 10 + ( mretv & MENU_LOWER_MASK );
|
retv = 10 + ( mretv & MENU_LOWER_MASK );
|
||||||
}
|
}
|
||||||
}
|
// Quick switch without entry selected.
|
||||||
else if ( ( mretv & MENU_QUICK_SWITCH ) ) {
|
else if ( ( mretv & MENU_QUICK_SWITCH ) && selected_line == -1 ) {
|
||||||
if ( ( mretv & MENU_CUSTOM_INPUT ) ) {
|
|
||||||
dmenu_output_formatted_line ( format, *input, -1, *input );
|
dmenu_output_formatted_line ( format, *input, -1, *input );
|
||||||
}
|
|
||||||
else{
|
|
||||||
dmenu_output_formatted_line ( format, list[selected_line], selected_line, *input );
|
|
||||||
}
|
|
||||||
|
|
||||||
restart = FALSE;
|
restart = FALSE;
|
||||||
retv = 10 + ( mretv & MENU_LOWER_MASK );
|
retv = 10 + ( mretv & MENU_LOWER_MASK );
|
||||||
|
|
Loading…
Reference in New Issue