From a4cde497e296ebdeedeafe2519e75a09c6fd9488 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 12 Jul 2000 07:21:46 +0000 Subject: Added John's autocompletion changes and fiddled to make autocompletion list size better. --- src/AutoComplete.cxx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/AutoComplete.cxx') diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index d45ab27a6..f9dbd4d67 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -11,7 +11,6 @@ #include "AutoComplete.h" AutoComplete::AutoComplete() { - lb = 0; active = false; posStart = 0; strcpy(stopChars, ""); @@ -54,8 +53,7 @@ char AutoComplete::GetSeparator() { return separator; } -int AutoComplete::SetList(const char *list) { - int maxStrLen = 12; +void AutoComplete::SetList(const char *list) { lb.Clear(); char *words = new char[strlen(list) + 1]; if (words) { @@ -66,18 +64,15 @@ int AutoComplete::SetList(const char *list) { if (words[i] == separator) { words[i] = '\0'; lb.Append(startword); - maxStrLen = Platform::Maximum(maxStrLen, strlen(startword)); startword = words + i + 1; } } if (startword) { lb.Append(startword); - maxStrLen = Platform::Maximum(maxStrLen, strlen(startword)); } delete []words; } lb.Sort(); - return maxStrLen; } void AutoComplete::Show() { @@ -88,7 +83,6 @@ void AutoComplete::Show() { void AutoComplete::Cancel() { if (lb.Created()) { lb.Destroy(); - lb = 0; active = false; } } -- cgit v1.2.3