(cm)
| 384 | // LINE NUMBERS |
| 385 | |
| 386 | function alignHorizontally(cm) { |
| 387 | var display = cm.display; |
| 388 | if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return; |
| 389 | var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; |
| 390 | var gutterW = display.gutters.offsetWidth, l = comp + "px"; |
| 391 | for (var n = display.lineDiv.firstChild; n; n = n.nextSibling) if (n.alignable) { |
| 392 | for (var i = 0, a = n.alignable; i < a.length; ++i) a[i].style.left = l; |
| 393 | } |
| 394 | if (cm.options.fixedGutter) |
| 395 | display.gutters.style.left = (comp + gutterW) + "px"; |
| 396 | } |
| 397 | |
| 398 | function maybeUpdateLineNumberWidth(cm) { |
| 399 | if (!cm.options.lineNumbers) return false; |
no test coverage detected