restart search after toggling option

This commit is contained in:
nightwing 2013-03-27 15:33:12 +04:00
commit 74a66575f3

View file

@ -55,7 +55,7 @@ var html = '<div class="ace_search right">\
<div class="ace_search_options">\
<span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>\
<span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>\
<span action="toggleWholeWords" class="ace_button" title="Shole Word Search">\\b</span>\
<span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>\
</div>\
</div>'.replace(/>\s+/g, ">");
@ -126,9 +126,6 @@ var SearchBox = function(editor, range, showReplaceForm) {
event.addListener(this.replaceInput, "focus", function() {
_this.activeInput = _this.replaceInput;
});
event.addListener(this.searchOptions, "change", function() {
_this.find(false, false);
});
};
//keybinging outsite of the searchbox
@ -199,6 +196,7 @@ var SearchBox = function(editor, range, showReplaceForm) {
dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked);
dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked);
dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked);
this.find(false, false);
};
this.find = function(skipCurrent, backwards) {