(doc, sel, options)
| 5111 | } |
| 5112 | |
| 5113 | function setSelectionNoUndo(doc, sel, options) { |
| 5114 | if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) |
| 5115 | { sel = filterSelectionChange(doc, sel, options); } |
| 5116 | |
| 5117 | var bias = options && options.bias || |
| 5118 | (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1); |
| 5119 | setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true)); |
| 5120 | |
| 5121 | if (!(options && options.scroll === false) && doc.cm && doc.cm.getOption("readOnly") != "nocursor") |
| 5122 | { ensureCursorVisible(doc.cm); } |
| 5123 | } |
| 5124 | |
| 5125 | function setSelectionInner(doc, sel) { |
| 5126 | if (sel.equals(doc.sel)) { return } |
no test coverage detected