Skip to content

Commit

Permalink
search and replace caused an exception if the
Browse files Browse the repository at this point in the history
search term was not found.
  • Loading branch information
fjakobs committed Aug 2, 2011
1 parent d4c76c5 commit a09141a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ace/editor.js
Expand Up @@ -1124,6 +1124,9 @@ var Editor =function(renderer, session) {
this.$search.set(options);

var range = this.$search.find(this.session);
if (!range)
return;

this.$tryReplace(range, replacement);
if (range !== null)
this.selection.setSelectionRange(range);
Expand Down

0 comments on commit a09141a

Please sign in to comment.