diff --git a/src/layer/marker.js b/src/layer/marker.js index 935e1b8a4c..3307c7b89b 100644 --- a/src/layer/marker.js +++ b/src/layer/marker.js @@ -165,7 +165,7 @@ class Marker { } else { this.elt( clazz + " ace_br1 ace_start", - "height:"+ height+ "px;"+ "right:0;"+ "top:"+top+ "px;left:"+ left+ "px;" + (extraStyle || "") + "height:"+ height+ "px;"+ "right:" + padding + "px;"+ "top:"+top+ "px;left:"+ left+ "px;" + (extraStyle || "") ); } // from start of the last line to the selection end @@ -197,7 +197,7 @@ class Marker { this.elt( clazz + (radiusClass ? " ace_br" + radiusClass : ""), "height:"+ height+ "px;"+ - "right:0;"+ + "right:" + padding + "px;"+ "top:"+ top+ "px;"+ "left:"+ padding+ "px;"+ (extraStyle || "") ); diff --git a/src/marker_group_test.js b/src/marker_group_test.js index 6e65fd3d50..f8006daab8 100644 --- a/src/marker_group_test.js +++ b/src/marker_group_test.js @@ -114,8 +114,8 @@ module.exports = { assert.equal(markerSize.height, lineHeight); // Should start at the 13th character (including 4px offset) assert.equal(markerSize.left, 12 * characterWidth + 4); - // Shoud be as wide as the marker layer - 12 characters and the offset. - assert.equal(markerSize.width, editor.renderer.$markerBack.element.getBoundingClientRect().width - 12 * characterWidth - 4); + // Shoud be as wide as the marker layer - 12 characters and the offset on both sides. + assert.equal(markerSize.width, editor.renderer.$markerBack.element.getBoundingClientRect().width - 12 * characterWidth - 4 - 4); }, "test: should default to markers of text type": function() { editor.resize(true);