(cm)
| 745 | |
| 746 | // No selection, plain cursor |
| 747 | function updateSelectionCursor(cm) { |
| 748 | var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, "div"); |
| 749 | display.cursor.style.left = pos.left + "px"; |
| 750 | display.cursor.style.top = pos.top + "px"; |
| 751 | display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"; |
| 752 | display.cursor.style.display = ""; |
| 753 | |
| 754 | if (pos.other) { |
| 755 | display.otherCursor.style.display = ""; |
| 756 | display.otherCursor.style.left = pos.other.left + "px"; |
| 757 | display.otherCursor.style.top = pos.other.top + "px"; |
| 758 | display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"; |
| 759 | } else { display.otherCursor.style.display = "none"; } |
| 760 | } |
| 761 | |
| 762 | // Highlight selection |
| 763 | function updateSelectionRange(cm) { |
no test coverage detected