(doc, origin, prev, sel)
| 7991 | } |
| 7992 | |
| 7993 | function selectionEventCanBeMerged(doc, origin, prev, sel) { |
| 7994 | var ch = origin.charAt(0); |
| 7995 | return ch == "*" || |
| 7996 | ch == "+" && |
| 7997 | prev.ranges.length == sel.ranges.length && |
| 7998 | prev.somethingSelected() == sel.somethingSelected() && |
| 7999 | new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500); |
| 8000 | } |
| 8001 | |
| 8002 | // Called whenever the selection changes, sets the new selection as |
| 8003 | // the pending selection in the history, and pushes the old pending |
no test coverage detected