MCPcopy
hub / github.com/witheve/Eve / moveLogically

Function moveLogically

src/codemirror.js:8741–8745  ·  view source on GitHub ↗
(line, start, dir, byUnit)

Source from the content-addressed store, hash-verified

8739 }
8740
8741 function moveLogically(line, start, dir, byUnit) {
8742 var target = start + dir;
8743 if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir;
8744 return target < 0 || target > line.text.length ? null : target;
8745 }
8746
8747 // Bidirectional ordering algorithm
8748 // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm

Callers 1

moveVisuallyFunction · 0.85

Calls 1

isExtendingCharFunction · 0.85

Tested by

no test coverage detected