MCPcopy
hub / github.com/nwutils/nw-sample-apps / extend

Function extend

mini-code-edit/cm/lib/codemirror.js:421–432  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

419 setCursor(start.line, start.ch, true);
420
421 function extend(e) {
422 var cur = posFromMouse(e, true);
423 if (cur && !posEq(cur, last)) {
424 if (!focused) onFocus();
425 last = cur;
426 setSelectionUser(start, cur);
427 updateInput = false;
428 var visible = visibleLines();
429 if (cur.line >= visible.to || cur.line < visible.from)
430 going = setTimeout(operation(function(){extend(e);}), 150);
431 }
432 }
433
434 function done(e) {
435 clearTimeout(going);

Callers 1

onMouseDownFunction · 0.85

Calls 6

posFromMouseFunction · 0.85
posEqFunction · 0.85
onFocusFunction · 0.85
setSelectionUserFunction · 0.85
visibleLinesFunction · 0.85
operationFunction · 0.85

Tested by

no test coverage detected