aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-11-06 04:28:03 +0000
committernyamatongwe <devnull@localhost>2000-11-06 04:28:03 +0000
commita27d56d300cf5f967938edec21233dd6161770ec (patch)
tree95f55aaa5bc616600fcdecc8d3e668dfefa06cb9 /src
parent56e0e3cb9da6e123926de5cbe72a227d9f67f260 (diff)
downloadscintilla-mirror-a27d56d300cf5f967938edec21233dd6161770ec.tar.gz
Fix from laurent so binary search works when ignoring case.
Diffstat (limited to 'src')
-rw-r--r--src/PropSet.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PropSet.cxx b/src/PropSet.cxx
index a58d14316..d5be286e1 100644
--- a/src/PropSet.cxx
+++ b/src/PropSet.cxx
@@ -513,10 +513,10 @@ const char *WordList::GetNearestWord(const char *wordStart, int searchLen /*= -1
cond = strncasecmp(wordStart, word, searchLen);
if (!cond && nonFuncChar(word[searchLen])) // maybe there should be a "non-word character" test here?
return word; // result must not be freed with free()
+ else if (cond >= 0)
+ start = pivot + 1;
else if (cond < 0)
end = pivot - 1;
- else if (cond > 0)
- start = pivot + 1;
}
else // preserve the letter case
while (start <= end) { // binary searching loop