Merge pull request #2409 from ether/fix-removeAttribOnLine
AttribManager#removeAttribOnLine: Remove Linemarker entirely if there's nothing else leftpull/2411/head^2
commit
68f50ff9fa
|
@ -172,7 +172,9 @@ AttributeManager.prototype = _(AttributeManager.prototype).extend({
|
||||||
|
|
||||||
if(hasMarker){
|
if(hasMarker){
|
||||||
ChangesetUtils.buildKeepRange(this.rep, builder, loc, (loc = [lineNum, 0]));
|
ChangesetUtils.buildKeepRange(this.rep, builder, loc, (loc = [lineNum, 0]));
|
||||||
ChangesetUtils.buildKeepRange(this.rep, builder, loc, (loc = [lineNum, 1]), attribs, this.rep.apool);
|
// If length == 4, there's [author, lmkr, insertorder, + the attrib being removed] thus we can remove the marker entirely
|
||||||
|
if(attribs.length == 4) ChangesetUtils.buildRemoveRange(this.rep, builder, loc, (loc = [lineNum, 1]))
|
||||||
|
else ChangesetUtils.buildKeepRange(this.rep, builder, loc, (loc = [lineNum, 1]), attribs, this.rep.apool);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.applyChangeset(builder);
|
return this.applyChangeset(builder);
|
||||||
|
|
Loading…
Reference in New Issue