(cm, repeat, event)
| 7348 | } |
| 7349 | |
| 7350 | function configureMouse(cm, repeat, event) { |
| 7351 | var option = cm.getOption("configureMouse"); |
| 7352 | var value = option ? option(cm, repeat, event) : {}; |
| 7353 | if (value.unit == null) { |
| 7354 | var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey; |
| 7355 | value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line"; |
| 7356 | } |
| 7357 | if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; } |
| 7358 | if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; } |
| 7359 | if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); } |
| 7360 | return value |
| 7361 | } |
| 7362 | |
| 7363 | function leftButtonDown(cm, pos, repeat, event) { |
| 7364 | if (ie) { setTimeout(bind(ensureFocus, cm), 0); } |
no test coverage detected