MCPcopy Index your code
hub / github.com/witheve/Eve / moveInLine

Function moveInLine

src/codemirror.js:8706–8711  ·  view source on GitHub ↗
(line, pos, dir, byUnit)

Source from the content-addressed store, hash-verified

8704 }
8705
8706 function moveInLine(line, pos, dir, byUnit) {
8707 if (!byUnit) return pos + dir;
8708 do pos += dir;
8709 while (pos > 0 && isExtendingChar(line.text.charAt(pos)));
8710 return pos;
8711 }
8712
8713 // This is needed in order to move 'visually' through bi-directional
8714 // text -- i.e., pressing left should make the cursor go left, even

Callers 1

moveVisuallyFunction · 0.85

Calls 1

isExtendingCharFunction · 0.85

Tested by

no test coverage detected