Fix Ctrl-R when prompt is at the bottom

It moved cursor in the opposite direction.
This commit is contained in:
xaizek 2018-04-19 18:14:05 +03:00
parent 3e9c3c52e5
commit aae170ad3c
No known key found for this signature in database
GPG key ID: 99DC5E4DB05F6BE2

View file

@ -1065,6 +1065,10 @@ void loop_to_select(Hstr *hstr)
printDefaultLabel=FALSE;
}
if(c == K_CTRL_R) {
c = (hstr->promptBottom ? K_CTRL_P : K_CTRL_N);
}
switch (c) {
case KEY_HOME:
// avoids printing of wild chars in search prompt
@ -1238,7 +1242,6 @@ void loop_to_select(Hstr *hstr)
highlight_selection(selectionCursorPosition, previousSelectionCursorPosition, pattern, hstr);
move(hstr->promptY, basex+strlen(pattern));
break;
case K_CTRL_R:
case KEY_DOWN:
case K_CTRL_J:
case K_CTRL_N: