[Geany-devel] Use of Scintilla word boundaries for word searches
lists.ban at xxxxx
Fri Aug 19 16:10:42 UTC 2011
I'm trying to address bug 3386129 , and I'd like comments & reviews
about my fix, because the whole thing don't look obvious at all...
We already have 2 ways of determining what a "word" is: a manual one
using GEANY_WORDCHARS or a caller-given list of wordchars, and one that
uses Scintilla's word boundaries.
The former seems to make more sense when the caller code knows the kind
of characters it wants (e.g. tags lookups), but the latter is better
when getting the word to search for.
Currently the latter is only used to select the current word, and the
second everywhere else we want to get the current word.
Actually if we do a whole word search we *need* to get what Scintilla
sees as a "word" since we leave the search to it (see bug report for a
example of what's going wrong otherwise).
So in the attached patch, I added a alternative way to get the the
current word (that uses the same algorithm as the word selection) and
tries to use it whenever the word was fetched for a search.
I'd appreciate reviews & comments :)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7358 bytes
Desc: not available
More information about the Devel