MCPcopy Index your code
hub / github.com/csev/py4e / updateSelectionCursor

Function updateSelectionCursor

tools/pythonauto/static/codemirror/codemirror.js:806–819  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

804
805 // No selection, plain cursor
806 function updateSelectionCursor(cm) {
807 var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, "div");
808 display.cursor.style.left = pos.left + "px";
809 display.cursor.style.top = pos.top + "px";
810 display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
811 display.cursor.style.display = "";
812
813 if (pos.other) {
814 display.otherCursor.style.display = "";
815 display.otherCursor.style.left = pos.other.left + "px";
816 display.otherCursor.style.top = pos.other.top + "px";
817 display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
818 } else { display.otherCursor.style.display = "none"; }
819 }
820
821 // Highlight selection
822 function updateSelectionRange(cm) {

Callers 1

updateSelectionFunction · 0.85

Calls 1

cursorCoordsFunction · 0.70

Tested by

no test coverage detected