summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2002-07-06 21:28:04 +0000
committersabetts <sabetts>2002-07-06 21:28:04 +0000
commit538c8055da7ed86f159a7c5dc8aaf867d14385df (patch)
tree493886321ad8e1507e2a0e1136ad25a53d011d53
parentf246dd7c5a7ec34f224653f9deef470b0a0928cb (diff)
downloadratpoison-538c8055da7ed86f159a7c5dc8aaf867d14385df.zip
(cmd_help): key descriptions don't run off the
bottom of the screen.
-rw-r--r--ChangeLog5
-rw-r--r--src/actions.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 590ee4c..56413ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-07-06 Shawn Betts <sabetts@vcn.bc.ca>
+
+ * src/actions.c (cmd_help): key descriptions don't run off the
+ bottom of the screen.
+
2002-03-23 Shawn Betts <sabetts@vcn.bc.ca>
* src/actions.c (command): look for the command in the aliases
diff --git a/src/actions.c b/src/actions.c
index 6f82590..875c235 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1471,7 +1471,8 @@ cmd_help (int interactive, void *data)
}
y += FONT_HEIGHT (defaults.font);
- if (y > s->root_attr.height)
+ /* Make sure the next line fits entirely within the window. */
+ if (y + FONT_HEIGHT (defaults.font) >= s->root_attr.height)
{
if (drawing_keys)
{
@@ -1483,6 +1484,7 @@ cmd_help (int interactive, void *data)
{
x += max_width + 20;
drawing_keys = 1;
+ i++;
old_i = i;
}