small cleanup
This commit is contained in:
parent
2021536794
commit
ca35f324c8
1 changed files with 5 additions and 4 deletions
|
|
@ -44,15 +44,15 @@ var Selection = require("./selection").Selection;
|
|||
var onMouseDown = require("./mouse/multi_select_handler").onMouseDown;
|
||||
exports.commands = require("./commands/multi_select_commands");
|
||||
|
||||
// Todo
|
||||
var Search = require("ace/search").Search
|
||||
var search = new Search
|
||||
// Todo: session.find or editor.findVolatile that returns range
|
||||
var Search = require("./search").Search;
|
||||
var search = new Search();
|
||||
|
||||
function find(session, needle, dir) {
|
||||
search.$options.wrap = true;
|
||||
search.$options.needle = needle;
|
||||
search.$options.backwards = dir == -1;
|
||||
return search.find(session)
|
||||
return search.find(session);
|
||||
}
|
||||
|
||||
// extend EditSession
|
||||
|
|
@ -335,6 +335,7 @@ var Editor = require("./editor").Editor;
|
|||
var editor = e.editor;
|
||||
if (!command.multiSelectAction) {
|
||||
command.exec(editor, e.args || {});
|
||||
editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());
|
||||
editor.multiSelect.mergeOverlappingRanges();
|
||||
} else if (command.multiSelectAction == "forEach") {
|
||||
editor.forEachSelection(command, e.args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue