1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-03 04:23:42 -05:00

Make down key behave different from tab, it feels inconsistent.

This commit is contained in:
Qball Cow 2014-01-22 17:48:50 +01:00
parent c5ed30c532
commit 458503df90

View file

@ -980,13 +980,13 @@ int menu( char **lines, char **input, char *prompt, int selected, Time *time, in
else
// Up or Shift-Tab
if ( key == XK_Up || ( key == XK_Tab && ev.xkey.state & ShiftMask ) )
if ( key == XK_Up || ( key == XK_Tab && ev.xkey.state & ShiftMask ) ) {
selected = selected ? MAX( 0, selected-1 ): MAX( 0, filtered_lines-1 );
else
// Down or Tab
if ( key == XK_Down || key == XK_Tab ) {
}
else if ( key == XK_Down ) {
selected = selected < filtered_lines-1 ? MIN( filtered_lines-1, selected+1 ): 0;
}
else if ( key == XK_Tab ) {
if ( filtered_lines == 1 ) {
chosen = 1;
break;