MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / cursorIsBefore

Function cursorIsBefore

static/js/codemirror/keymap/vim.js:1468–1475  ·  view source on GitHub ↗
(cur1, cur2)

Source from the content-addressed store, hash-verified

1466 return cur1.ch == cur2.ch && cur1.line == cur2.line;
1467 }
1468 function cursorIsBefore(cur1, cur2) {
1469 if (cur1.line < cur2.line) {
1470 return true;
1471 } else if (cur1.line == cur2.line && cur1.ch < cur2.ch) {
1472 return true;
1473 }
1474 return false;
1475 }
1476 function lineLength(cm, lineNum) {
1477 return cm.getLine(lineNum).length;
1478 }

Callers 1

VimFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected