diff --git a/lib/ace/ext/searchbox.js b/lib/ace/ext/searchbox.js
index 8e663504..c416b275 100644
--- a/lib/ace/ext/searchbox.js
+++ b/lib/ace/ext/searchbox.js
@@ -49,7 +49,7 @@ var html = '
\
\
\
\
- \
+ \
\
\
\
@@ -224,10 +224,18 @@ var SearchBox = function(editor, range, showReplaceForm) {
this.find(true, true);
};
this.replace = function() {
- this.editor.replace(this.replaceInput.value);
+ if (!this.editor.getReadOnly())
+ this.editor.replace(this.replaceInput.value);
+ };
+ this.replaceAndFindNext = function() {
+ if (!this.editor.getReadOnly()) {
+ this.editor.replace(this.replaceInput.value);
+ this.findNext()
+ }
};
this.replaceAll = function() {
- this.editor.replaceAll(this.replaceInput.value);
+ if (!this.editor.getReadOnly())
+ this.editor.replaceAll(this.replaceInput.value);
};
this.hide = function() {
@@ -258,47 +266,6 @@ exports.Search = function(editor, isReplace) {
sb.show(editor.session.getTextRange(), isReplace);
};
-
-exports.ISearch = function(session, options) {
- this.$changeListener = this.$changeListener.bind(this);
- this.startRange = session.selection.toOrientedRange();
- this.options = options || {};
-};
-
-(function(){
- this.setSession = function(session) {
- if (this.session) {
- this.session.removeListener(this.$changeListener);
- }
- this.session = session;
- this.session.addListener(this.$changeListener);
- };
- this.setSearchString = function() {
-
- };
- this.getValue = function() {
- if (this.value == null)
- this.value = this.session.getValue();
- return this.value;
- };
- this.$changeListener = function() {
- this.value = null;
- };
- this.find = function() {
-
- };
- this.$edgeBefore = function() {
- this.cursor = this.startRange[this.options.backwards ? "start" : "end"];
- };
- this.$edgeAfter = function() {
-
- };
- this.next = function(dir) {
-
- };
-}).call(exports.ISearch.prototype);
-
-
});