MCPcopy
hub / github.com/hokein/electron-sample-apps / setSelectionUser

Function setSelectionUser

mini-code-editor/cm/lib/codemirror.js:1167–1175  ·  view source on GitHub ↗
(from, to)

Source from the content-addressed store, hash-verified

1165 else shiftSelecting = null;
1166 }
1167 function setSelectionUser(from, to) {
1168 var sh = shiftSelecting && clipPos(shiftSelecting);
1169 if (sh) {
1170 if (posLess(sh, from)) from = sh;
1171 else if (posLess(to, sh)) to = sh;
1172 }
1173 setSelection(from, to);
1174 userSelChange = true;
1175 }
1176 // Update the selection. Last two args are only used by
1177 // updateLines, since they have to be expressed in the line
1178 // numbers before the update.

Callers 6

extendFunction · 0.85
doneFunction · 0.85
loadFileFunction · 0.85
onDropFunction · 0.85
selectWordAtFunction · 0.85
selectLineFunction · 0.85

Calls 3

clipPosFunction · 0.85
posLessFunction · 0.85
setSelectionFunction · 0.85

Tested by

no test coverage detected