Skip to content

Commit 46ae703

Browse files
mbostockmarijnh
authored andcommitted
Ignore lastCopied if not paste.
1 parent 0f4cf11 commit 46ae703

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/input/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function applyTextInput(cm, inserted, deleted, sel, origin) {
5050
from = Pos(from.line, from.ch - deleted)
5151
else if (cm.state.overwrite && !paste) // Handle overwrite
5252
to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length))
53-
else if (lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == inserted)
53+
else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == inserted)
5454
from = to = Pos(from.line, 0)
5555
}
5656
updateInput = cm.curOp.updateInput

0 commit comments

Comments
 (0)