aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/lxdialog/textbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/lxdialog/textbox.c')
-rw-r--r--scripts/kconfig/lxdialog/textbox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c
index a48bb93e0907..1773319b95e7 100644
--- a/scripts/kconfig/lxdialog/textbox.c
+++ b/scripts/kconfig/lxdialog/textbox.c
@@ -80,7 +80,7 @@ int dialog_textbox(const char *title, char *tbuf, int initial_height,
80 80
81do_resize: 81do_resize:
82 getmaxyx(stdscr, height, width); 82 getmaxyx(stdscr, height, width);
83 if (height < 8 || width < 8) 83 if (height < TEXTBOX_HEIGTH_MIN || width < TEXTBOX_WIDTH_MIN)
84 return -ERRDISPLAYTOOSMALL; 84 return -ERRDISPLAYTOOSMALL;
85 if (initial_height != 0) 85 if (initial_height != 0)
86 height = initial_height; 86 height = initial_height;
@@ -98,8 +98,8 @@ do_resize:
98 width = 0; 98 width = 0;
99 99
100 /* center dialog box on screen */ 100 /* center dialog box on screen */
101 x = (COLS - width) / 2; 101 x = (getmaxx(stdscr) - width) / 2;
102 y = (LINES - height) / 2; 102 y = (getmaxy(stdscr) - height) / 2;
103 103
104 draw_shadow(stdscr, y, x, height, width); 104 draw_shadow(stdscr, y, x, height, width);
105 105