mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Include time in ddg search result output lines
This commit is contained in:
parent
90ac69beb3
commit
ae4c54bdcc
@ -764,12 +764,25 @@ void
|
|||||||
ui_duck_result(const char * const result)
|
ui_duck_result(const char * const result)
|
||||||
{
|
{
|
||||||
int win_index = _find_prof_win_index("DuckDuckGo search");
|
int win_index = _find_prof_win_index("DuckDuckGo search");
|
||||||
|
|
||||||
if (win_index != NUM_WINS) {
|
if (win_index != NUM_WINS) {
|
||||||
win_print_time(windows[win_index], '-');
|
win_print_time(windows[win_index], '-');
|
||||||
wattron(windows[win_index]->win, COLOUR_THEM);
|
wattron(windows[win_index]->win, COLOUR_THEM);
|
||||||
wprintw(windows[win_index]->win, "Result : ");
|
wprintw(windows[win_index]->win, "Result : ");
|
||||||
wattroff(windows[win_index]->win, COLOUR_THEM);
|
wattroff(windows[win_index]->win, COLOUR_THEM);
|
||||||
wprintw(windows[win_index]->win, result);
|
|
||||||
|
int i = 0;
|
||||||
|
while (i < strlen(result)) {
|
||||||
|
if (result[i] == '\n') {
|
||||||
|
wprintw(windows[win_index]->win, "\n");
|
||||||
|
win_print_time(windows[win_index], '-');
|
||||||
|
} else {
|
||||||
|
waddch(windows[win_index]->win, result[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
wprintw(windows[win_index]->win, "\n");
|
wprintw(windows[win_index]->win, "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user