MCPcopy Create free account
hub / github.com/TruthHun/BookStack / moveOnce

Function moveOnce

static/editor.md/lib/codemirror/lib/codemirror.js:4646–4655  ·  view source on GitHub ↗
(boundToLine)

Source from the content-addressed store, hash-verified

4644 return lineObj = getLine(doc, l);
4645 }
4646 function moveOnce(boundToLine) {
4647 var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true);
4648 if (next == null) {
4649 if (!boundToLine && findNextLine()) {
4650 if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj);
4651 else ch = dir < 0 ? lineObj.text.length : 0;
4652 } else return (possible = false);
4653 } else ch = next;
4654 return true;
4655 }
4656
4657 if (unit == "char") moveOnce();
4658 else if (unit == "column") moveOnce(true);

Callers 1

findPosHFunction · 0.70

Calls 1

findNextLineFunction · 0.70

Tested by

no test coverage detected