Skip to content

Commit bf70155

Browse files
authored
Fix search panel size (#472)
* switched to plain refresh() in showmsg.c * add comment regarding the usage of showmsg functions
1 parent 3d7f7b8 commit bf70155

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/main.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,9 +559,6 @@ static void ui_init() {
559559
exit(EXIT_FAILURE);
560560
}
561561

562-
InitSearchPanel(); /* at least one panel has to be defined
563-
for refreshp() to work */
564-
565562
getmaxyx(stdscr, ymax, xmax);
566563
if ((ymax < 22) || (xmax < 80)) {
567564
char c;

src/showmsg.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static int linectr = 0;
3030
void clearmsg() {
3131
clear();
3232
linectr = 0;
33-
refreshp();
33+
refresh();
3434
}
3535

3636

@@ -41,7 +41,6 @@ void clearmsg_wait(void) {
4141
mvaddstr(LINES - 2, 0, "Press any key to continue!");
4242
move(LINES - 1, 0);
4343
clrtoeol();
44-
refreshp();
4544
IGNORE(key_get());
4645
} else {
4746
sleep(1);
@@ -50,11 +49,11 @@ void clearmsg_wait(void) {
5049
}
5150

5251

53-
static int has_room_for_message() {
52+
static bool has_room_for_message() {
5453
if (linectr < LINES - 3)
55-
return 1;
54+
return true;
5655
else
57-
return 0;
56+
return false;
5857
}
5958

6059
void show_formatted(char *fmt, ...) {
@@ -68,7 +67,7 @@ void show_formatted(char *fmt, ...) {
6867
va_end(args);
6968
mvaddstr(linectr, 0, str);
7069
g_free(str);
71-
refreshp();
70+
refresh();
7271
linectr++;
7372
}
7473

src/showmsg.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
#ifndef STARTMSG_H
2222
#define STARTMSG_H
2323

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

2530
void clearmsg(void);
2631
void clearmsg_wait(void);

0 commit comments

Comments
 (0)