From 461e7d178f21135df571d440b82c86c2e85388a0 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 29 May 2004 23:26:35 +0000 Subject: Removed treating ':' as end of word in GetNearestWords as it conflicted with languages that use ':' inside identifiers. Functionality can be achieved by passing ':' as otherSeparator parameter. --- src/PropSet.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/PropSet.cxx b/src/PropSet.cxx index d0a7f8b0f..00e9986f7 100644 --- a/src/PropSet.cxx +++ b/src/PropSet.cxx @@ -913,15 +913,13 @@ const char *WordList::GetNearestWord(const char *wordStart, int searchLen /*= -1 /** * Find the length of a 'word' which is actually an identifier in a string - * which looks like "identifier(..." or "identifier:" or "identifier" and where + * which looks like "identifier(..." or "identifier" and where * there may be extra spaces after the identifier that should not be * counted in the length. */ static unsigned int LengthWord(const char *word, char otherSeparator) { - // Find a '(', or ':'. If that fails go to the end of the string. + // Find a '('. If that fails go to the end of the string. const char *endWord = strchr(word, '('); - if (!endWord) - endWord = strchr(word, ':'); if (!endWord && otherSeparator) endWord = strchr(word, otherSeparator); if (!endWord) @@ -930,7 +928,7 @@ static unsigned int LengthWord(const char *word, char otherSeparator) { // Drop any space characters. if (endWord > word) { - endWord--; // Back from the '(', ':', or '\0' + endWord--; // Back from the '(', otherSeparator, or '\0' // Move backwards over any spaces while ((endWord > word) && (IsASpace(*endWord))) { endWord--; -- cgit v1.2.3