(cm)
| 356 | // LINE NUMBERS |
| 357 | |
| 358 | function alignHorizontally(cm) { |
| 359 | var display = cm.display; |
| 360 | if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return; |
| 361 | var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; |
| 362 | var gutterW = display.gutters.offsetWidth, l = comp + "px"; |
| 363 | for (var n = display.lineDiv.firstChild; n; n = n.nextSibling) if (n.alignable) { |
| 364 | for (var i = 0, a = n.alignable; i < a.length; ++i) a[i].style.left = l; |
| 365 | } |
| 366 | if (cm.options.fixedGutter) |
| 367 | display.gutters.style.left = (comp + gutterW) + "px"; |
| 368 | } |
| 369 | |
| 370 | function maybeUpdateLineNumberWidth(cm) { |
| 371 | if (!cm.options.lineNumbers) return false; |
no test coverage detected