MCPcopy
hub / github.com/hokein/electron-sample-apps / setCursor

Function setCursor

mini-code-editor/cm/lib/codemirror.js:1234–1237  ·  view source on GitHub ↗
(line, ch, user)

Source from the content-addressed store, hash-verified

1232 else return getNonHidden(-1) || getNonHidden(1);
1233 }
1234 function setCursor(line, ch, user) {
1235 var pos = clipPos({line: line, ch: ch || 0});
1236 (user ? setSelectionUser : setSelection)(pos, pos);
1237 }
1238
1239 function clipLine(n) {return Math.max(0, Math.min(n, doc.size-1));}
1240 function clipPos(pos) {

Callers 5

CodeMirrorFunction · 0.85
onMouseDownFunction · 0.85
dragEndFunction · 0.85
moveHFunction · 0.85
moveVFunction · 0.85

Calls 1

clipPosFunction · 0.85

Tested by

no test coverage detected