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

Function moveLogically

static/editor.md/lib/codemirror/lib/codemirror.js:8466–8470  ·  view source on GitHub ↗
(line, start, dir, byUnit)

Source from the content-addressed store, hash-verified

8464 }
8465
8466 function moveLogically(line, start, dir, byUnit) {
8467 var target = start + dir;
8468 if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir;
8469 return target < 0 || target > line.text.length ? null : target;
8470 }
8471
8472 // Bidirectional ordering algorithm
8473 // 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