summaryrefslogtreecommitdiff
path: root/gnu/lib/libdialog/tree.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>1999-04-25 22:14:06 +0000
committerWarner Losh <imp@FreeBSD.org>1999-04-25 22:14:06 +0000
commitbdca080cce757ee7664f9038d18fb25493fc12f5 (patch)
tree2c7758be8aa5c5db9f44af46995596d6c340a6ab /gnu/lib/libdialog/tree.c
parentfc51d58e6237f46bbca99157a1fe7bbf62e57cc0 (diff)
Notes
Diffstat (limited to 'gnu/lib/libdialog/tree.c')
-rw-r--r--gnu/lib/libdialog/tree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/lib/libdialog/tree.c b/gnu/lib/libdialog/tree.c
index e48f134d5ffa..43c7399abbdd 100644
--- a/gnu/lib/libdialog/tree.c
+++ b/gnu/lib/libdialog/tree.c
@@ -315,7 +315,7 @@ int dialog_treemenu(unsigned char *title, unsigned char *prompt,
else
i = choice - 1;
}
- else if (key == KEY_DOWN || key == '+')
+ else if (key == KEY_DOWN || key == '+') {
if (choice == max_choice - 1) {
if (scroll+choice < item_no-1) {
#ifdef BROKEN_WSCRL
@@ -352,6 +352,7 @@ int dialog_treemenu(unsigned char *title, unsigned char *prompt,
}
else
i = choice + 1;
+ }
if (i != choice) {
/* De-highlight current item */
@@ -987,7 +988,7 @@ mk_tree(unsigned char **names, int size, unsigned char FS,
in_string = name = names[i];
while(*in_string)
{
- if (*in_string == FS)
+ if (*in_string == FS) {
if (!i && !*(in_string + 1))
name = in_string;
else
@@ -995,6 +996,7 @@ mk_tree(unsigned char **names, int size, unsigned char FS,
shift++;
name = in_string + 1;
}
+ }
in_string++;
}
array[i].name = name;