SideBySide2: Fix line length columnMargin to appear at correct column

This element is inside of the scrolling area, to the right of the line
number gutter managed by CodeMirror.  Adding the width of the gutter
is incorrect, moving the margin marker that many columns right.

Change-Id: Ieaea5a48815a145ee748af9b97c6dc589c60f5dd
This commit is contained in:
Shawn Pearce
2014-05-08 21:25:24 -07:00
parent f87c9ab360
commit c835dd4087

View File

@@ -628,12 +628,12 @@ public class SideBySide2 extends Screen {
void setLineLength(int columns) {
columnMarginA.getStyle().setMarginLeft(
columns * cmA.defaultCharWidth()
+ cmA.getGutterElement().getOffsetWidth(), Unit.PX);
columns * cmA.defaultCharWidth(),
Unit.PX);
columnMarginB.getStyle().setMarginLeft(
columns * cmB.defaultCharWidth()
+ cmB.getGutterElement().getOffsetWidth(), Unit.PX);
columns * cmB.defaultCharWidth(),
Unit.PX);
}
void setShowLineNumbers(boolean b) {