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

Function moveOnce

external/.scrollLibs.js:11910–11927  ·  view source on GitHub ↗
(boundToLine)

Source from the content-addressed store, hash-verified

11908 return (lineObj = getLine(doc, l))
11909 }
11910 function moveOnce(boundToLine) {
11911 var next
11912 if (visually) {
11913 next = moveVisually(doc.cm, lineObj, pos, dir)
11914 } else {
11915 next = moveLogically(lineObj, pos, dir)
11916 }
11917 if (next == null) {
11918 if (!boundToLine && findNextLine()) {
11919 pos = endOfLine(visually, doc.cm, lineObj, pos.line, dir)
11920 } else {
11921 return false
11922 }
11923 } else {
11924 pos = next
11925 }
11926 return true
11927 }
11928
11929 if (unit == "char") {
11930 moveOnce()

Callers 1

findPosHFunction · 0.85

Calls 4

moveVisuallyFunction · 0.85
moveLogicallyFunction · 0.85
findNextLineFunction · 0.85
endOfLineFunction · 0.85

Tested by

no test coverage detected