(doc, sel, options)
| 94 | |
| 95 | // Set a new selection. |
| 96 | export function setSelection(doc, sel, options) { |
| 97 | setSelectionNoUndo(doc, sel, options) |
| 98 | addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options) |
| 99 | } |
| 100 | |
| 101 | export function setSelectionNoUndo(doc, sel, options) { |
| 102 | if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) |
no test coverage detected