MCPcopy Create free account
hub / github.com/breck7/scroll / setGuttersForLineNumbers

Function setGuttersForLineNumbers

external/.scrollLibs.js:6126–6134  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

6124 // Make sure the gutters options contains the element
6125 // "CodeMirror-linenumbers" when the lineNumbers option is true.
6126 function setGuttersForLineNumbers(options) {
6127 var found = indexOf(options.gutters, "CodeMirror-linenumbers")
6128 if (found == -1 && options.lineNumbers) {
6129 options.gutters = options.gutters.concat(["CodeMirror-linenumbers"])
6130 } else if (found > -1 && !options.lineNumbers) {
6131 options.gutters = options.gutters.slice(0)
6132 options.gutters.splice(found, 1)
6133 }
6134 }
6135
6136 // Since the delta values reported on mouse wheel events are
6137 // unstandardized between browsers and even browser versions, and

Callers 2

defineOptionsFunction · 0.85
CodeMirrorFunction · 0.85

Calls 3

indexOfFunction · 0.85
concatMethod · 0.80
sliceMethod · 0.80

Tested by

no test coverage detected