Merge remote-tracking branch 'nightwing/multiCursor' into multiCursor
Conflicts: lib/ace/multi_select.js
This commit is contained in:
commit
d9456740c6
1 changed files with 4 additions and 4 deletions
|
|
@ -44,7 +44,7 @@ var Selection = require("./selection").Selection;
|
|||
var onMouseDown = require("./mouse/multi_select_handler").onMouseDown;
|
||||
exports.commands = require("./commands/multi_select_commands");
|
||||
|
||||
// Todo
|
||||
// Todo: session.find or editor.findVolatile that returns range
|
||||
var Search = require("./search").Search;
|
||||
var search = new Search();
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ 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
|
||||
|
|
@ -67,7 +67,7 @@ var EditSession = require("./edit_session").EditSession;
|
|||
;(function() {
|
||||
// list of ranges in reverse addition order
|
||||
this.ranges = null;
|
||||
|
||||
|
||||
// automatically sorted list of ranges
|
||||
this.rangeList = null;
|
||||
|
||||
|
|
@ -336,6 +336,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);
|
||||
|
|
@ -496,7 +497,6 @@ var Editor = require("./editor").Editor;
|
|||
this.selectMore = function (dir, skip) {
|
||||
var session = this.session;
|
||||
var sel = session.multiSelect;
|
||||
var all = sel.ranges;
|
||||
|
||||
var range = sel.toOrientedRange();
|
||||
if (range.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue