Skip to content

Commit 944ff92

Browse files
committed
Fix accidentally removed semicolon that broke the style of line gutter backgrounds
And don't put indentation in css strings. Issue #4312
1 parent 82ab0b4 commit 944ff92

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/measurement/update_line.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,13 @@ function updateLineGutter(cm, lineView, lineN, dims) {
9595
if (lineView.line.gutterClass) {
9696
let wrap = ensureLineWrapped(lineView)
9797
lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass,
98-
`left: ${cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth}px
99-
width: ${dims.gutterTotalWidth}px`)
98+
`left: ${cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth}px; width: ${dims.gutterTotalWidth}px`)
10099
wrap.insertBefore(lineView.gutterBackground, lineView.text)
101100
}
102101
let markers = lineView.line.gutterMarkers
103102
if (cm.options.lineNumbers || markers) {
104103
let wrap = ensureLineWrapped(lineView)
105-
let gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", `left:
106-
${cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth}px`)
104+
let gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", `left: ${cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth}px`)
107105
cm.display.input.setUneditable(gutterWrap)
108106
wrap.insertBefore(gutterWrap, lineView.text)
109107
if (lineView.line.gutterClass)
@@ -112,8 +110,7 @@ function updateLineGutter(cm, lineView, lineN, dims) {
112110
lineView.lineNumber = gutterWrap.appendChild(
113111
elt("div", lineNumberFor(cm.options, lineN),
114112
"CodeMirror-linenumber CodeMirror-gutter-elt",
115-
`left: ${dims.gutterLeft["CodeMirror-linenumbers"]}px;
116-
width: ${cm.display.lineNumInnerWidth}px`))
113+
`left: ${dims.gutterLeft["CodeMirror-linenumbers"]}px; width: ${cm.display.lineNumInnerWidth}px`))
117114
if (markers) for (let k = 0; k < cm.options.gutters.length; ++k) {
118115
let id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id]
119116
if (found)

0 commit comments

Comments
 (0)