slackware-current/source/a/dialog/dialog.all.use_height.diff

49 lines
1.9 KiB
Diff
Raw Normal View History

--- ./menubox.c.orig 2019-11-10 19:41:15.000000000 -0600
+++ ./menubox.c 2019-12-06 13:16:39.400865476 -0600
@@ -433,7 +433,8 @@
* After displaying the prompt, we know how much space we really have.
* Limit the list to avoid overwriting the ok-button.
*/
- all.menu_height = height - MIN_HIGH - cur_y;
+ if (all.menu_height + MIN_HIGH > height - cur_y)
+ all.menu_height = height - MIN_HIGH - cur_y;
if (all.menu_height <= 0)
all.menu_height = 1;
--- ./buildlist.c.orig 2019-11-10 19:41:43.000000000 -0600
+++ ./buildlist.c 2019-12-06 13:16:39.402865476 -0600
@@ -653,7 +653,8 @@
* After displaying the prompt, we know how much space we really have.
* Limit the list to avoid overwriting the ok-button.
*/
- all.use_height = height - MIN_HIGH - cur_y;
+ if (all.use_height + MIN_HIGH > height - cur_y)
+ all.use_height = height - MIN_HIGH - cur_y;
if (all.use_height <= 0)
all.use_height = 1;
--- ./checklist.c.orig 2019-11-10 19:26:35.000000000 -0600
+++ ./checklist.c 2019-12-06 13:16:39.404865476 -0600
@@ -304,7 +304,8 @@
* After displaying the prompt, we know how much space we really have.
* Limit the list to avoid overwriting the ok-button.
*/
- all.use_height = height - MIN_HIGH - cur_y;
+ if (all.use_height + MIN_HIGH > height - cur_y)
+ all.use_height = height - MIN_HIGH - cur_y;
if (all.use_height <= 0)
all.use_height = 1;
--- ./treeview.c.orig 2019-11-10 19:38:22.000000000 -0600
+++ ./treeview.c 2019-12-06 13:17:35.604866677 -0600
@@ -291,7 +291,8 @@
* After displaying the prompt, we know how much space we really have.
* Limit the list to avoid overwriting the ok-button.
*/
- use_height = height - MIN_HIGH - cur_y;
+ if (use_height + MIN_HIGH > height - cur_y)
+ use_height = height - MIN_HIGH - cur_y;
if (use_height <= 0)
use_height = 1;