mirror of
https://github.com/dvorka/hstr.git
synced 2025-09-11 23:14:16 +08:00
Fix Ctrl-R when prompt is at the bottom
It moved cursor in the opposite direction.
This commit is contained in:
parent
3e9c3c52e5
commit
aae170ad3c
1 changed files with 4 additions and 1 deletions
|
@ -1065,6 +1065,10 @@ void loop_to_select(Hstr *hstr)
|
||||||
printDefaultLabel=FALSE;
|
printDefaultLabel=FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(c == K_CTRL_R) {
|
||||||
|
c = (hstr->promptBottom ? K_CTRL_P : K_CTRL_N);
|
||||||
|
}
|
||||||
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case KEY_HOME:
|
case KEY_HOME:
|
||||||
// avoids printing of wild chars in search prompt
|
// avoids printing of wild chars in search prompt
|
||||||
|
@ -1238,7 +1242,6 @@ void loop_to_select(Hstr *hstr)
|
||||||
highlight_selection(selectionCursorPosition, previousSelectionCursorPosition, pattern, hstr);
|
highlight_selection(selectionCursorPosition, previousSelectionCursorPosition, pattern, hstr);
|
||||||
move(hstr->promptY, basex+strlen(pattern));
|
move(hstr->promptY, basex+strlen(pattern));
|
||||||
break;
|
break;
|
||||||
case K_CTRL_R:
|
|
||||||
case KEY_DOWN:
|
case KEY_DOWN:
|
||||||
case K_CTRL_J:
|
case K_CTRL_J:
|
||||||
case K_CTRL_N:
|
case K_CTRL_N:
|
||||||
|
|
Loading…
Add table
Reference in a new issue