parent
e2d786c758
commit
b5ce22f1e3
|
@ -51,7 +51,7 @@ export function applyTextInput(cm, inserted, deleted, sel, origin) {
|
||||||
from = Pos(from.line, from.ch - deleted)
|
from = Pos(from.line, from.ch - deleted)
|
||||||
else if (cm.state.overwrite && !paste) // Handle overwrite
|
else if (cm.state.overwrite && !paste) // Handle overwrite
|
||||||
to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length))
|
to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length))
|
||||||
else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == inserted)
|
else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == textLines.join("\n"))
|
||||||
from = to = Pos(from.line, 0)
|
from = to = Pos(from.line, 0)
|
||||||
}
|
}
|
||||||
let changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,
|
let changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,
|
||||||
|
@ -132,4 +132,4 @@ export function hiddenTextarea() {
|
||||||
if (ios) te.style.border = "1px solid black"
|
if (ios) te.style.border = "1px solid black"
|
||||||
disableBrowserMagic(te)
|
disableBrowserMagic(te)
|
||||||
return div
|
return div
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue