isearch: being flexible about whether emacs mode is on or not
This commit is contained in:
parent
54d80d79ab
commit
0a055cb725
1 changed files with 2 additions and 1 deletions
|
|
@ -141,7 +141,8 @@ oop.inherits(IncrementalSearch, Search);
|
|||
options.start = this.$currentPos;
|
||||
var session = this.$editor.session,
|
||||
found = this.find(session),
|
||||
shouldSelect = !!this.$editor.emacsMark();
|
||||
shouldSelect = this.$editor.emacsMark ?
|
||||
!!this.$editor.emacsMark() : !this.$editor.selection.isEmpty();
|
||||
if (found) {
|
||||
if (options.backwards) found = Range.fromPoints(found.end, found.start);
|
||||
this.$editor.selection.setRange(Range.fromPoints(shouldSelect ? this.$startPos : found.end, found.end));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue