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

Function moveInLine

static/mergely/lib/codemirror.js:8674–8679  ·  view source on GitHub ↗
(line, pos, dir, byUnit)

Source from the content-addressed store, hash-verified

8672 }
8673
8674 function moveInLine(line, pos, dir, byUnit) {
8675 if (!byUnit) return pos + dir;
8676 do pos += dir;
8677 while (pos > 0 && isExtendingChar(line.text.charAt(pos)));
8678 return pos;
8679 }
8680
8681 // This is needed in order to move 'visually' through bi-directional
8682 // 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