diff options
author | nyamatongwe <unknown> | 2007-02-26 22:43:33 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2007-02-26 22:43:33 +0000 |
commit | 4912aea49a23c8d9735eb5169a70c5b874891f74 (patch) | |
tree | db63112cf07204b2ff1d7c3f8b260ad2c5ec63b4 | |
parent | 4377f43a891b78f12a9326fa2fe1f8362a96da38 (diff) | |
download | scintilla-mirror-4912aea49a23c8d9735eb5169a70c5b874891f74.tar.gz |
Change finding near words in a WordList to first search for the
character passed in and only iof not found search for the
default '('.
-rw-r--r-- | src/PropSet.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/PropSet.cxx b/src/PropSet.cxx index c563d2bed..26b6afa4b 100644 --- a/src/PropSet.cxx +++ b/src/PropSet.cxx @@ -1056,10 +1056,13 @@ const char *WordList::GetNearestWord(const char *wordStart, int searchLen, bool * counted in the length. */ static unsigned int LengthWord(const char *word, char otherSeparator) { - // Find a '('. If that fails go to the end of the string. - const char *endWord = strchr(word, '('); - if (!endWord && otherSeparator) + const char *endWord = 0; + // Find an otherSeparator + if (otherSeparator) endWord = strchr(word, otherSeparator); + // Find a '('. If that fails go to the end of the string. + if (!endWord) + endWord = strchr(word, '('); if (!endWord) endWord = word + strlen(word); // Last case always succeeds so endWord != 0 |