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

Function wrapX

external/.scrollLibs.js:4523–4528  ·  view source on GitHub ↗
(pos, dir, side)

Source from the content-addressed store, hash-verified

4521 }
4522
4523 function wrapX(pos, dir, side) {
4524 var extent = wrappedLineExtentChar(cm, lineObj, null, pos)
4525 var prop = (dir == "ltr") == (side == "after") ? "left" : "right"
4526 var ch = side == "after" ? extent.begin : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1)
4527 return coords(ch, prop)[prop]
4528 }
4529
4530 var order = getOrder(lineObj, doc.direction)
4531 iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {

Callers 1

drawForLineFunction · 0.85

Calls 2

wrappedLineExtentCharFunction · 0.85
coordsFunction · 0.85

Tested by

no test coverage detected