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

Function getCurrentSelectedAreaRange

src/codemirror.js:12166–12173  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12164 function getSelectedAreaRange(cm, vim) {
12165 var lastSelection = vim.lastSelection;
12166 var getCurrentSelectedAreaRange = function() {
12167 var selections = cm.listSelections();
12168 var start = selections[0];
12169 var end = selections[selections.length-1];
12170 var selectionStart = cursorIsBefore(start.anchor, start.head) ? start.anchor : start.head;
12171 var selectionEnd = cursorIsBefore(end.anchor, end.head) ? end.head : end.anchor;
12172 return [selectionStart, selectionEnd];
12173 };
12174 var getLastSelectedAreaRange = function() {
12175 var selectionStart = cm.getCursor();
12176 var selectionEnd = cm.getCursor();

Callers 1

getSelectedAreaRangeFunction · 0.85

Calls 2

cursorIsBeforeFunction · 0.85
listSelectionsMethod · 0.80

Tested by

no test coverage detected