MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / getCurrentSelectedAreaRange

Function getCurrentSelectedAreaRange

lib/web/CodeMirror/keymap/vim.js:3111–3118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3109 function getSelectedAreaRange(cm, vim) {
3110 var lastSelection = vim.lastSelection;
3111 var getCurrentSelectedAreaRange = function() {
3112 var selections = cm.listSelections();
3113 var start = selections[0];
3114 var end = selections[selections.length-1];
3115 var selectionStart = cursorIsBefore(start.anchor, start.head) ? start.anchor : start.head;
3116 var selectionEnd = cursorIsBefore(end.anchor, end.head) ? end.head : end.anchor;
3117 return [selectionStart, selectionEnd];
3118 };
3119 var getLastSelectedAreaRange = function() {
3120 var selectionStart = cm.getCursor();
3121 var selectionEnd = cm.getCursor();

Callers 1

getSelectedAreaRangeFunction · 0.85

Calls 1

cursorIsBeforeFunction · 0.85

Tested by

no test coverage detected