mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-16 02:28:41 -09:00
Make width of scan error screen dynamic as well
This commit is contained in:
parent
a87e90c3c2
commit
832b91b033
1 changed files with 5 additions and 4 deletions
|
|
@ -335,15 +335,16 @@ static void calc_draw_progress() {
|
||||||
|
|
||||||
|
|
||||||
static void calc_draw_error(char *cur, char *msg) {
|
static void calc_draw_error(char *cur, char *msg) {
|
||||||
nccreate(7, 60, "Error!");
|
int width = wincols-5;
|
||||||
|
nccreate(7, width, "Error!");
|
||||||
|
|
||||||
attron(A_BOLD);
|
attron(A_BOLD);
|
||||||
ncaddstr(2, 2, "Error:");
|
ncaddstr(2, 2, "Error:");
|
||||||
attroff(A_BOLD);
|
attroff(A_BOLD);
|
||||||
|
|
||||||
ncprint(2, 9, "could not open %s", cropstr(cur, 34));
|
ncprint(2, 9, "could not open %s", cropstr(cur, width-26));
|
||||||
ncprint(3, 4, "%s", cropstr(msg, 52));
|
ncprint(3, 4, "%s", cropstr(msg, width-8));
|
||||||
ncaddstr(5, 30, "press any key to continue...");
|
ncaddstr(5, width-30, "press any key to continue...");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue