From 74d224e1b2c779c39812e98bb58bb592d1d64fc3 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 22 Aug 2002 22:15:39 +0000 Subject: [PATCH] * editcmd.c: Clean up global variables in the completion code. --- edit/ChangeLog | 2 ++ edit/editcmd.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/edit/ChangeLog b/edit/ChangeLog index 0890cea9b..ad33caede 100644 --- a/edit/ChangeLog +++ b/edit/ChangeLog @@ -1,5 +1,7 @@ 2002-08-22 Pavel Roskin + * editcmd.c: Clean up global variables in the completion code. + * editwidget.c: Use new dialog flags. * editcmd.c: Likewise. (edit_completion_dialog): Set DLG_COMPACT for the dialog. diff --git a/edit/editcmd.c b/edit/editcmd.c index a0957b610..139401a61 100644 --- a/edit/editcmd.c +++ b/edit/editcmd.c @@ -2459,9 +2459,7 @@ static void edit_set_search_parameters (int rs, int rb, int rr, int rw, int rc) } -unsigned int MAX_WORD_COMPLETIONS = 100; /* in listbox */ -unsigned int compl_dlg_h; /* completion dialog height */ -unsigned int compl_dlg_w; /* completion dialog width */ +const static int MAX_WORD_COMPLETIONS = 100; /* in listbox */ /* collect the possible completions */ @@ -2536,7 +2534,9 @@ void edit_completion_dialog (WEdit *edit, int max_len, int word_len, char *curr = NULL; Dlg_head *compl_dlg; WListbox *compl_list; - + unsigned int compl_dlg_h; /* completion dialog height */ + unsigned int compl_dlg_w; /* completion dialog width */ + /* calculate the dialog metrics */ compl_dlg_h = num_compl + 2; compl_dlg_w = max_len + 4;