(doc, sel, options)
| 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; |
no test coverage detected