Skip to content

Commit

Permalink
Fix missing clipPos calls in file drop code
Browse files Browse the repository at this point in the history
Closes #6127
  • Loading branch information
marijnh committed Feb 3, 2020
1 parent 89d21ec commit ba5452f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/edit/drop_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function onDrop(e) {
text.filter(t => t != null).join(cm.doc.lineSeparator())),
origin: "paste"}
makeChange(cm.doc, change)
setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)))
setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change))))
})()
}
}
Expand Down

0 comments on commit ba5452f

Please sign in to comment.