summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b66f4f7)
raw | patch | inline | side by side (parent: b66f4f7)
author | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Wed, 19 Oct 2011 12:29:52 +0000 (13:29 +0100) | ||
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Wed, 19 Oct 2011 12:29:52 +0000 (13:29 +0100) |
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 db88d87c512da485f733fa1ef1f02f7884f3dfc0..04a316bbb27897ebd2247934db03c978988d0487 100644 (file)
--- a/lib/search.tcl
+++ b/lib/search.tcl
field default_regexpsearch
field casesensitive
field default_casesensitive
+field smartcase
field searchdirn -forwards
field history
set ctext $i_text
set default_regexpsearch [is_config_true gui.search.regexp]
- if {[is_config_true gui.search.smartcase]} {
+ set smartcase [is_config_true gui.search.smartcase]
+ if {$smartcase} {
set default_casesensitive 0
} else {
set default_casesensitive 1
if {[catch {$ctext index anchor}]} {
$ctext mark set anchor [_get_new_anchor $this]
}
- if {[regexp {[[:upper:]]} $searchstring]} {
- set casesensitive 1
+ if {$smartcase} {
+ if {[regexp {[[:upper:]]} $searchstring]} {
+ set casesensitive 1
+ }
}
if {$searchstring ne {}} {
set here [_do_search $this anchor mlen]