(cm, repeat, event)
| 114 | } |
| 115 | |
| 116 | function configureMouse(cm, repeat, event) { |
| 117 | let option = cm.getOption("configureMouse") |
| 118 | let value = option ? option(cm, repeat, event) : {} |
| 119 | if (value.unit == null) { |
| 120 | let rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey |
| 121 | value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line" |
| 122 | } |
| 123 | if (value.extend == null || cm.doc.extend) value.extend = cm.doc.extend || event.shiftKey |
| 124 | if (value.addNew == null) value.addNew = mac ? event.metaKey : event.ctrlKey |
| 125 | if (value.moveOnDrag == null) value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey) |
| 126 | return value |
| 127 | } |
| 128 | |
| 129 | function leftButtonDown(cm, pos, repeat, event) { |
| 130 | if (ie) setTimeout(bind(ensureFocus, cm), 0) |
no test coverage detected