MCPcopy Create free account
hub / github.com/retspen/webvirtcloud / blockSelect

Function blockSelect

static/js/ace.js:16502–16519  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16500 var initialRange;
16501 var rectSel = [];
16502 var blockSelect = function() {
16503 var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
16504 var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column);
16505
16506 if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead))
16507 return;
16508 screenCursor = newCursor;
16509
16510 editor.selection.moveToPosition(cursor);
16511 editor.renderer.scrollCursorIntoView();
16512
16513 editor.removeSelectionMarkers(rectSel);
16514 rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);
16515 if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty())
16516 rectSel[0] = editor.$mouseHandler.$clickSelection.clone();
16517 rectSel.forEach(editor.addSelectionMarker, editor);
16518 editor.updateSelectionMarkers();
16519 };
16520
16521 if (isMultiSelect && !accel) {
16522 selection.toSingleRange();

Callers

nothing calls this directly

Calls 1

isSamePointFunction · 0.85

Tested by

no test coverage detected