From 529ea750b146c23bd1f8c0ec0b3bbeb64689a736 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 5 Apr 2001 01:58:04 +0000 Subject: Replace target functionality to make find and replace operations faster by diminishing screen updates and allow for \d patterns in the replacement text. --- src/AutoComplete.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/AutoComplete.cxx') diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index 6abae23d6..81eb12d99 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -117,7 +117,9 @@ 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) + Cancel(); + else lb.Select(pos); } -- cgit v1.2.3