(cm, repeat, event)
| 10058 | } |
| 10059 | |
| 10060 | function configureMouse(cm, repeat, event) { |
| 10061 | var option = cm.getOption("configureMouse") |
| 10062 | var value = option ? option(cm, repeat, event) : {} |
| 10063 | if (value.unit == null) { |
| 10064 | var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey |
| 10065 | value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line" |
| 10066 | } |
| 10067 | if (value.extend == null || cm.doc.extend) { |
| 10068 | value.extend = cm.doc.extend || event.shiftKey |
| 10069 | } |
| 10070 | if (value.addNew == null) { |
| 10071 | value.addNew = mac ? event.metaKey : event.ctrlKey |
| 10072 | } |
| 10073 | if (value.moveOnDrag == null) { |
| 10074 | value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey) |
| 10075 | } |
| 10076 | return value |
| 10077 | } |
| 10078 | |
| 10079 | function leftButtonDown(cm, pos, repeat, event) { |
| 10080 | if (ie) { |
no test coverage detected