Valik:
In my mind, the functions isfilenamecharforsel() and iswordcharforsel()
should be removed in favor of the following generic function:
static bool ischarinset(char c, const char *set, bool invert = true)
...
Then, instead of passing those two functions around, a couple of
(global) static strings are passed to provide the same functionality.
Now that the valid word character set is passed as a parameter,
SciTEBase::SelectionWord can get an expanded word.characters.filepattern
and pass that instead of the (currently) hard-coded string.
Does this approach sound reasonable to you?
Not really as it uses mutable global data rather than instance data
which is the wrong direction for the code to move in. A nice approach
would use some form of function object that tied the string and
callable together to pass around. It may be simpler here to recognise
there is only a couple of choices that can be coded as member
functions and pass a boolean or enum rather than a function pointer to
choose. IIRC this was Philippe's feature and he may have an idea where
to take this.
Neil
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest