Revision 635416
Go back to digest for 25th February 2007Features in KDE Base
Make the functions in the search bar work (mostly), here is a status:
[x] case sensitive (was working already.)
[x] whole words (like in 3.5, add \b at the ends of the pattern.
[x] regular expression (if not enabled, the pattern used is passed through QRegExp::excape(). Search is not performed unless the pattern is valid.)
[x] from cursor (begin in the proper place IMO, this should be enabled pr default.)
[/] selection only (when enabled, the search is not incremental and you have to press the RETURN key to perform the search. This is because the result is selected, and as such the selection is moved. We could store the original selection to work around this, and eventually highlight it differently. thoughts about this is wellcome.)
[/] highlight all (all matches are found, and highlight added but not displayed or removed *visually* again EVER. read kwrite-devel from today for the entertaining story ;). Code-wise, the highlight are removed when a new search is initiated, this should be subject to discussion as well, maybe we should provide a way to unhighlight it, or do it in other/more events (hiding the search bar comes to mind.))
TODO: Currently search is always performed when RETURN/ENTER keys are pressed, and this is wrong when the incremental searching is active (becomes like find next). A possible fix is comparing the potential pattern to that in the regex.
In addition, I have made this small improvement: When searching incrementally and you get no match, the non-matching string is selected in the pattern entry, so that you just overwrite it with the next keypress.
Happy searching :-)
File Changes
- /trunk/KDE/kdelibs/kate/part
- /katesearchbar.cpp
- /katesearchbar.h