summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a0243d)
raw | patch | inline | side by side (parent: 0a0243d)
author | Bert Wesarg <bert.wesarg@googlemail.com> | |
Fri, 14 Oct 2011 08:14:51 +0000 (10:14 +0200) | ||
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Tue, 18 Oct 2011 08:27:28 +0000 (09:27 +0100) |
It's off by default, but can be enabled via the config gui.search.regexp.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
lib/search.tcl | patch | blob | history |
diff --git a/lib/search.tcl b/lib/search.tcl
index 461c66d1a0e34853e244c4c0071e69bffe1ef931..9268ec325bb4dd639f7dcc7f0e68c7301b7786a8 100644 (file)
--- a/lib/search.tcl
+++ b/lib/search.tcl
field ctext
field searchstring {}
+field regexpsearch
+field default_regexpsearch
field casesensitive
field default_casesensitive
field searchdirn -forwards
set w $i_w
set ctext $i_text
+ set default_regexpsearch [is_config_true gui.search.regexp]
if {[is_config_true gui.search.smartcase]} {
set default_casesensitive 0
} else {
entry $w.ent -textvariable ${__this}::searchstring -background lightgreen
${NS}::button $w.bn -text [mc Next] -command [cb find_next]
${NS}::button $w.bp -text [mc Prev] -command [cb find_prev]
- ${NS}::checkbutton $w.cs -text [mc Case-Sensitive] \
+ ${NS}::checkbutton $w.re -text [mc RegExp] \
+ -variable ${__this}::regexpsearch -command [cb _incrsearch]
+ ${NS}::checkbutton $w.cs -text [mc Case] \
-variable ${__this}::casesensitive -command [cb _incrsearch]
pack $w.l -side left
pack $w.cs -side right
+ pack $w.re -side right
pack $w.bp -side right
pack $w.bn -side right
pack $w.ent -side left -expand 1 -fill x
method show {} {
if {![visible $this]} {
grid $w
+ set regexpsearch $default_regexpsearch
set casesensitive $default_casesensitive
}
focus -force $w.ent
upvar $mlenvar mlen
lappend cmd -count mlen
}
+ if {$regexpsearch} {
+ lappend cmd -regexp
+ }
if {!$casesensitive} {
lappend cmd -nocase
}