Merge pull request #382 from jonatanklosko/issue-98

Fix bug with inserting links and undoing things.
patch-ionaru
Wes Cossick 8 years ago committed by GitHub
commit 580a4b0286

@ -795,8 +795,9 @@ function _replaceSelection(cm, active, startEnd, url) {
var text;
var start = startEnd[0];
var end = startEnd[1];
var startPoint = cm.getCursor("start");
var endPoint = cm.getCursor("end");
var startPoint = {}, endPoint = {};
Object.assign(startPoint, cm.getCursor("start"));
Object.assign(endPoint, cm.getCursor("end"));
if(url) {
end = end.replace("#url#", url);
}
@ -2033,4 +2034,4 @@ SimpleMDE.prototype.toTextArea = function() {
}
};
module.exports = SimpleMDE;
module.exports = SimpleMDE;

Loading…
Cancel
Save