MCPcopy Index your code
hub / github.com/csev/py4e / extend

Function extend

tools/pythonauto/static/codemirror/codemirror.js:1829–1848  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

1827 var counter = 0;
1828
1829 function extend(e) {
1830 var curCount = ++counter;
1831 var cur = posFromMouse(cm, e, true);
1832 if (!cur) return;
1833 if (!posEq(cur, last)) {
1834 ensureFocus(cm);
1835 last = cur;
1836 doSelect(cur);
1837 var visible = visibleLines(display, doc);
1838 if (cur.line >= visible.to || cur.line < visible.from)
1839 setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150);
1840 } else {
1841 var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;
1842 if (outside) setTimeout(operation(cm, function() {
1843 if (counter != curCount) return;
1844 display.scroller.scrollTop += outside;
1845 extend(e);
1846 }), 50);
1847 }
1848 }
1849
1850 function done(e) {
1851 counter = Infinity;

Callers 1

onMouseDownFunction · 0.70

Calls 6

doSelectFunction · 0.85
posFromMouseFunction · 0.70
posEqFunction · 0.70
ensureFocusFunction · 0.70
visibleLinesFunction · 0.70
operationFunction · 0.70

Tested by

no test coverage detected