From 47c3e67c26e19f237bab42d3a98019add82bb4b5 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 27 Apr 2001 12:41:50 +0000 Subject: Feature from Stephan to allow autocompletion to stay open even when there are no longer any values that start with the typed text. --- src/AutoComplete.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/AutoComplete.cxx') diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index 81eb12d99..676a4124d 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -19,7 +19,8 @@ AutoComplete::AutoComplete() : chooseSingle(false), posStart(0), startLen(0), - cancelAtStartPos(true) { + cancelAtStartPos(true), + autoHide(true) { stopChars[0] = '\0'; fillUpChars[0] = '\0'; } @@ -117,7 +118,7 @@ void AutoComplete::Move(int delta) { void AutoComplete::Select(const char *word) { int pos = lb.Find(word); //Platform::DebugPrintf("Autocompleting at <%s> %d\n", wordCurrent, pos); - if (pos == -1) + if (pos == -1 && autoHide) Cancel(); else lb.Select(pos); -- cgit v1.2.3