fix multiselect paste
This commit is contained in:
parent
c142244d90
commit
330ed1ee2e
1 changed files with 3 additions and 5 deletions
|
|
@ -504,13 +504,11 @@ var Editor = require("./editor").Editor;
|
|||
if (!this.inMultiSelectMode)
|
||||
return this.insert(text);
|
||||
|
||||
var lines = text.split(this.session.getDocument().getNewLineCharacter());
|
||||
var lines = text.split(/\r\n|\r|\n/);
|
||||
var ranges = this.selection.rangeList.ranges;
|
||||
|
||||
if (lines.length > ranges.length) {
|
||||
this.commands.exec("insertstring", this, text);
|
||||
return;
|
||||
}
|
||||
if (lines.length > ranges.length || (lines.length <= 2 || !lines[1]))
|
||||
return this.commands.exec("insertstring", this, text);
|
||||
|
||||
for (var i = ranges.length; i--; ) {
|
||||
var range = ranges[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue