Skip to content

Fix search panel size #472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,6 @@ static void ui_init() {
exit(EXIT_FAILURE);
}

InitSearchPanel(); /* at least one panel has to be defined
for refreshp() to work */

getmaxyx(stdscr, ymax, xmax);
if ((ymax < 22) || (xmax < 80)) {
char c;
Expand Down
11 changes: 5 additions & 6 deletions src/showmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static int linectr = 0;
void clearmsg() {
clear();
linectr = 0;
refreshp();
refresh();
}


Expand All @@ -41,7 +41,6 @@ void clearmsg_wait(void) {
mvaddstr(LINES - 2, 0, "Press any key to continue!");
move(LINES - 1, 0);
clrtoeol();
refreshp();
IGNORE(key_get());
} else {
sleep(1);
Expand All @@ -50,11 +49,11 @@ void clearmsg_wait(void) {
}


static int has_room_for_message() {
static bool has_room_for_message() {
if (linectr < LINES - 3)
return 1;
return true;
else
return 0;
return false;
}

void show_formatted(char *fmt, ...) {
Expand All @@ -68,7 +67,7 @@ void show_formatted(char *fmt, ...) {
va_end(args);
mvaddstr(linectr, 0, str);
g_free(str);
refreshp();
refresh();
linectr++;
}

Expand Down
5 changes: 5 additions & 0 deletions src/showmsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
#ifndef STARTMSG_H
#define STARTMSG_H

/*
* These functions provide progress and error reporting at start-up phase
* !!! Do not call them after switching to the main screen !!!
* For runtime notifications use TLF_SHOW_* macros instead
*/

void clearmsg(void);
void clearmsg_wait(void);
Expand Down
Loading