MCPcopy
hub / github.com/witheve/Eve / getHead

Function getHead

src/codemirror.js:12316–12324  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

12314 }
12315 }
12316 function getHead(cm) {
12317 var cur = cm.getCursor('head');
12318 if (cm.getSelection().length == 1) {
12319 // Small corner case when only 1 character is selected. The "real"
12320 // head is the left of head and anchor.
12321 cur = cursorMin(cur, cm.getCursor('anchor'));
12322 }
12323 return cur;
12324 }
12325
12326 /**
12327 * If moveHead is set to false, the CodeMirror selection will not be

Callers 1

expandWordUnderCursorFunction · 0.85

Calls 3

cursorMinFunction · 0.85
getCursorMethod · 0.80
getSelectionMethod · 0.80

Tested by

no test coverage detected