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