search and replace caused an exception if the

search term was not found.
This commit is contained in:
Fabian Jakobs 2011-08-02 15:12:38 +02:00
commit a09141a723

View file

@ -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);