diff options
author | nyamatongwe <devnull@localhost> | 2007-02-26 22:43:33 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2007-02-26 22:43:33 +0000 |
commit | 68dd99bcacaad2a5c9be8b71bf541e455d7d1c67 (patch) | |
tree | db63112cf07204b2ff1d7c3f8b260ad2c5ec63b4 /src | |
parent | 73b6d7007e3d4ce13dfc859b7b52296ffbf1d1cf (diff) | |
download | scintilla-mirror-68dd99bcacaad2a5c9be8b71bf541e455d7d1c67.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 '('.
Diffstat (limited to 'src')
-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 |