[Geany-devel] Use of Scintilla word boundaries for word searches

Colomban Wendling lists.ban at xxxxx
Sat Aug 20 17:45:36 UTC 2011


Le 20/08/2011 18:06, Dimitar Zhekov a écrit :
> On Sat, 20 Aug 2011 23:58:47 +1000
> Lex Trotman <elextr at gmail.com> wrote:
> 
>> Can you point me to where Geany loads locale dependent wordchars and
>> where it gets it from?
> 
> Scintilla does it... oh, wait. Neither scintilla nor scite can find the
> word in ‘боза’, or even ‘boza’ (grep does, for 8-bit text). *Gee*.

Not sure I get it?

> On Sat, 20 Aug 2011 16:46:16 +0200
> Colomban Wendling <lists.ban at herbesfolles.org> wrote:
> 
>> Actually (as supposed in another mail), I guess that a "word" in
>> Scintilla's opinion when doing a word search is "everything non-empty
>> between two whitespace characters", so we DO both.
> 
> Like the famous "...consists of sequences of non-blank characters
> separated by blanks". :)

Yep, that's it ^^

>> My patch tries to use this definition of a "word" for search, and
>> keeps the other ("a sequence of wordchars") for symbol stuff.
> 
> Well, since using "Find previous/next selection" on a non-selected
> "g_new0(gchar" still finds the next/previous g_new0 or gchar (depending
> on the cursor position), and not the entire text, I guess it's all
> right...

Actually, AFAICT, it'll only find more things since when the "whole
word" mode is activated we will be sure that the "word" we give will be
recognized as such by Scintilla. An if you want you *can* make "foo(bar"
count for one word, by removing "(" from the whitepsacechars.

I think I'll commit it, we could unify the thing later anyway if we find
a clear and working unified method.  No objections?

> OTOH, finding "regcomp (" in "(regcomp (&" still doesn't
> succeed. Guess I can't have it both ways.

Hum, sorry? How finding "regcomp (" in a document containing "(regcomp
(&" could fail?

Cheers,
Colomban



More information about the Devel mailing list