()
| 1507 | // this adds a zero-width space so that we can later check whether |
| 1508 | // it got selected. |
| 1509 | function prepareSelectAllHack() { |
| 1510 | if (te.selectionStart != null) { |
| 1511 | var selected = cm.somethingSelected(); |
| 1512 | var extval = "\u200b" + (selected ? te.value : ""); |
| 1513 | te.value = "\u21da"; // Used to catch context-menu undo |
| 1514 | te.value = extval; |
| 1515 | input.prevInput = selected ? "" : "\u200b"; |
| 1516 | te.selectionStart = 1; te.selectionEnd = extval.length; |
| 1517 | // Re-set this, in case some other handler touched the |
| 1518 | // selection in the meantime. |
| 1519 | display.selForContextMenu = cm.doc.sel; |
| 1520 | } |
| 1521 | } |
| 1522 | function rehide() { |
| 1523 | input.contextMenuPending = false; |
| 1524 | input.wrapper.style.cssText = oldWrapperCSS |
no test coverage detected