Fixes issue where merge left, from added lines, were not being correctly inserted into the lhs.

This commit is contained in:
Jamie Peabody
2013-06-13 19:35:26 +01:00
parent 0cd70a833f
commit 09c9e31a0d

View File

@@ -1158,9 +1158,9 @@ jQuery.extend(Mgly.mergely.prototype, {
{ line: change[oside + '-line-to'], ch: line[oside].text.length });
}
else if (change['op'] == 'a') {
ed[oside].replaceRange( text + '\n',
{ line: change[oside + '-line-from'], ch: 0 },
{ line: change[oside + '-line-to'], ch: 0 });
ed[oside].replaceRange( '\n' + text,
{ line: change[oside + '-line-from'], ch: line[oside].text.length },
{ line: change[oside + '-line-to'], ch: line[oside].text.length });
}
else {// 'd'
var from = parseInt(change[oside + '-line-from']);