()
| 13044 | // this adds a zero-width space so that we can later check whether |
| 13045 | // it got selected. |
| 13046 | function prepareSelectAllHack() { |
| 13047 | if (te.selectionStart != null) { |
| 13048 | var selected = cm.somethingSelected() |
| 13049 | var extval = "\u200b" + (selected ? te.value : "") |
| 13050 | te.value = "\u21da" // Used to catch context-menu undo |
| 13051 | te.value = extval |
| 13052 | input.prevInput = selected ? "" : "\u200b" |
| 13053 | te.selectionStart = 1 |
| 13054 | te.selectionEnd = extval.length |
| 13055 | // Re-set this, in case some other handler touched the |
| 13056 | // selection in the meantime. |
| 13057 | display.selForContextMenu = cm.doc.sel |
| 13058 | } |
| 13059 | } |
| 13060 | function rehide() { |
| 13061 | if (input.contextMenuPending != rehide) { |
| 13062 | return |
no outgoing calls
no test coverage detected