search and replace caused an exception if the
search term was not found.
This commit is contained in:
parent
d4c76c5b55
commit
a09141a723
1 changed files with 3 additions and 0 deletions
|
|
@ -1124,6 +1124,9 @@ var Editor =function(renderer, session) {
|
||||||
this.$search.set(options);
|
this.$search.set(options);
|
||||||
|
|
||||||
var range = this.$search.find(this.session);
|
var range = this.$search.find(this.session);
|
||||||
|
if (!range)
|
||||||
|
return;
|
||||||
|
|
||||||
this.$tryReplace(range, replacement);
|
this.$tryReplace(range, replacement);
|
||||||
if (range !== null)
|
if (range !== null)
|
||||||
this.selection.setSelectionRange(range);
|
this.selection.setSelectionRange(range);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue