File src/hstr.c changed (mode: 100644) (index dfa2928..e724a91) |
... |
... |
char *hstr_print_selection(unsigned maxHistoryItems, char *pattern, Hstr *hstr) |
554 |
554 |
result=hstr->selection[0]; |
result=hstr->selection[0]; |
555 |
555 |
} |
} |
556 |
556 |
|
|
557 |
|
int height=get_max_history_items(stdscr); |
|
|
557 |
|
int height=get_max_history_items(); |
558 |
558 |
int width=getmaxx(stdscr); |
int width=getmaxx(stdscr); |
559 |
559 |
unsigned i; |
unsigned i; |
560 |
560 |
int y=Y_OFFSET_ITEMS; |
int y=Y_OFFSET_ITEMS; |
|
... |
... |
void loop_to_select(Hstr *hstr) |
698 |
698 |
print_help_label(); |
print_help_label(); |
699 |
699 |
print_history_label(hstr); |
print_history_label(hstr); |
700 |
700 |
// TODO why do I print non-filtered selection when on command line there is a pattern? |
// TODO why do I print non-filtered selection when on command line there is a pattern? |
701 |
|
hstr_print_selection(get_max_history_items(stdscr), NULL, hstr); |
|
|
701 |
|
hstr_print_selection(get_max_history_items(), NULL, hstr); |
702 |
702 |
color_attr_off(COLOR_PAIR(HH_COLOR_NORMAL)); |
color_attr_off(COLOR_PAIR(HH_COLOR_NORMAL)); |
703 |
703 |
|
|
704 |
704 |
bool done=FALSE, skip=TRUE, executeResult=FALSE, lowercase=TRUE, printDefaultLabel=FALSE; |
bool done=FALSE, skip=TRUE, executeResult=FALSE, lowercase=TRUE, printDefaultLabel=FALSE; |
|
... |
... |
void loop_to_select(Hstr *hstr) |
714 |
714 |
// TODO overflow |
// TODO overflow |
715 |
715 |
strcpy(pattern, hstr->cmdline); |
strcpy(pattern, hstr->cmdline); |
716 |
716 |
while (!done) { |
while (!done) { |
717 |
|
maxHistoryItems=get_max_history_items(stdscr); |
|
|
717 |
|
maxHistoryItems=get_max_history_items(); |
718 |
718 |
|
|
719 |
719 |
if(!skip) { |
if(!skip) { |
720 |
720 |
c = wgetch(stdscr); |
c = wgetch(stdscr); |