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

Function moveInLine

static/editor.md/lib/codemirror/lib/codemirror.js:8431–8436  ·  view source on GitHub ↗
(line, pos, dir, byUnit)

Source from the content-addressed store, hash-verified

8429 }
8430
8431 function moveInLine(line, pos, dir, byUnit) {
8432 if (!byUnit) return pos + dir;
8433 do pos += dir;
8434 while (pos > 0 && isExtendingChar(line.text.charAt(pos)));
8435 return pos;
8436 }
8437
8438 // This is needed in order to move 'visually' through bi-directional
8439 // text -- i.e., pressing left should make the cursor go left, even

Callers 1

moveVisuallyFunction · 0.70

Calls 1

isExtendingCharFunction · 0.70

Tested by

no test coverage detected