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

Function selectCompanionObject

static/js/codemirror/keymap/vim.js:1820–1829  ·  view source on GitHub ↗
(cm, revSymb, inclusive)

Source from the content-addressed store, hash-verified

1818 }
1819
1820 function selectCompanionObject(cm, revSymb, inclusive) {
1821 var cur = cm.getCursor();
1822
1823 var end = findMatchedSymbol(cm, cur, revSymb);
1824 var start = findMatchedSymbol(cm, end);
1825 start.ch += inclusive ? 1 : 0;
1826 end.ch += inclusive ? 0 : 1;
1827
1828 return { start: start, end: end };
1829 }
1830
1831 function regexLastIndexOf(string, pattern, startIndex) {
1832 for (var i = !startIndex ? string.length : startIndex;

Callers 1

VimFunction · 0.85

Calls 1

findMatchedSymbolFunction · 0.85

Tested by

no test coverage detected