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

Function moveLogically

tools/pythonauto/static/codemirrorepl/codemirror.js:7289–7293  ·  view source on GitHub ↗
(line, start, dir, byUnit)

Source from the content-addressed store, hash-verified

7287 }
7288
7289 function moveLogically(line, start, dir, byUnit) {
7290 var target = start + dir;
7291 if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir;
7292 return target < 0 || target > line.text.length ? null : target;
7293 }
7294
7295 // Bidirectional ordering algorithm
7296 // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm

Callers 1

moveVisuallyFunction · 0.70

Calls 1

isExtendingCharFunction · 0.70

Tested by

no test coverage detected