diff options
author | nyamatongwe <unknown> | 2005-02-07 23:48:51 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2005-02-07 23:48:51 +0000 |
commit | a1825308b823dd65da5ed8c94fbdbd8425e6a285 (patch) | |
tree | 82b3d1a6bb6a9f1412b77fdd7f67f7a879a860a4 /src/AutoComplete.cxx | |
parent | e9fedb211ceb5aeb36fc59bbf4a7de61ea80bff0 (diff) | |
download | scintilla-mirror-a1825308b823dd65da5ed8c94fbdbd8425e6a285.tar.gz |
Patch from Chris Jones to select exact case match when available.
Diffstat (limited to 'src/AutoComplete.cxx')
-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) { |