MCPcopy
hub / github.com/witheve/Eve / setSelectionNoUndo

Function setSelectionNoUndo

src/codemirror.js:2200–2210  ·  view source on GitHub ↗
(doc, sel, options)

Source from the content-addressed store, hash-verified

2198 }
2199
2200 function setSelectionNoUndo(doc, sel, options) {
2201 if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange"))
2202 sel = filterSelectionChange(doc, sel, options);
2203
2204 var bias = options && options.bias ||
2205 (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);
2206 setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));
2207
2208 if (!(options && options.scroll === false) && doc.cm)
2209 ensureCursorVisible(doc.cm);
2210 }
2211
2212 function setSelectionInner(doc, sel) {
2213 if (sel.equals(doc.sel)) return;

Callers 4

setSelectionFunction · 0.85
onDropFunction · 0.85
makeChangeSingleDocFunction · 0.85

Calls 5

hasHandlerFunction · 0.85
filterSelectionChangeFunction · 0.85
setSelectionInnerFunction · 0.85
skipAtomicInSelectionFunction · 0.85
ensureCursorVisibleFunction · 0.85

Tested by

no test coverage detected