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;
|
var onMouseDown = require("./mouse/multi_select_handler").onMouseDown;
|
||||||
exports.commands = require("./commands/multi_select_commands");
|
exports.commands = require("./commands/multi_select_commands");
|
||||||
|
|
||||||
// Todo
|
// Todo: session.find or editor.findVolatile that returns range
|
||||||
var Search = require("ace/search").Search
|
var Search = require("./search").Search;
|
||||||
var search = new Search
|
var search = new Search();
|
||||||
|
|
||||||
function find(session, needle, dir) {
|
function find(session, needle, dir) {
|
||||||
search.$options.wrap = true;
|
search.$options.wrap = true;
|
||||||
search.$options.needle = needle;
|
search.$options.needle = needle;
|
||||||
search.$options.backwards = dir == -1;
|
search.$options.backwards = dir == -1;
|
||||||
return search.find(session)
|
return search.find(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
// extend EditSession
|
// extend EditSession
|
||||||
|
|
@ -335,6 +335,7 @@ var Editor = require("./editor").Editor;
|
||||||
var editor = e.editor;
|
var editor = e.editor;
|
||||||
if (!command.multiSelectAction) {
|
if (!command.multiSelectAction) {
|
||||||
command.exec(editor, e.args || {});
|
command.exec(editor, e.args || {});
|
||||||
|
editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());
|
||||||
editor.multiSelect.mergeOverlappingRanges();
|
editor.multiSelect.mergeOverlappingRanges();
|
||||||
} else if (command.multiSelectAction == "forEach") {
|
} else if (command.multiSelectAction == "forEach") {
|
||||||
editor.forEachSelection(command, e.args);
|
editor.forEachSelection(command, e.args);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue