diff options
author | nyamatongwe <devnull@localhost> | 2005-02-07 23:48:51 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2005-02-07 23:48:51 +0000 |
commit | 30e4811a1b97041678d52554591493490c47c31b (patch) | |
tree | 82b3d1a6bb6a9f1412b77fdd7f67f7a879a860a4 /src | |
parent | ced9add8955744a621ffcccf5162684a781cf2bd (diff) | |
download | scintilla-mirror-30e4811a1b97041678d52554591493490c47c31b.tar.gz |
Patch from Chris Jones to select exact case match when available.
Diffstat (limited to 'src')
-rw-r--r-- | src/AutoComplete.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index adbd24d03..b4d14944f 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -170,6 +170,18 @@ void AutoComplete::Select(const char *word) { --pivot; } location = pivot; + if (ignoreCase) { + // Check for exact-case match + for (; pivot <= end; pivot++) { + lb->GetValue(pivot, item, maxItemLen); + if (!strncmp(word, item, lenWord)) { + location = pivot; + break; + } + if (CompareNCaseInsensitive(word, item, lenWord)) + break; + } + } } else if (cond < 0) { end = pivot - 1; } else if (cond > 0) { |