MCPcopy
hub / github.com/csev/py4e / moveInLine

Function moveInLine

tools/pythonauto/static/codemirrorepl/codemirror.js:7254–7259  ·  view source on GitHub ↗
(line, pos, dir, byUnit)

Source from the content-addressed store, hash-verified

7252 }
7253
7254 function moveInLine(line, pos, dir, byUnit) {
7255 if (!byUnit) return pos + dir;
7256 do pos += dir;
7257 while (pos > 0 && isExtendingChar(line.text.charAt(pos)));
7258 return pos;
7259 }
7260
7261 // This is needed in order to move 'visually' through bi-directional
7262 // 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