MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / getHead

Function getHead

lib/web/CodeMirror/keymap/vim.js:3261–3269  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

3259 }
3260 }
3261 function getHead(cm) {
3262 var cur = cm.getCursor('head');
3263 if (cm.getSelection().length == 1) {
3264 // Small corner case when only 1 character is selected. The "real"
3265 // head is the left of head and anchor.
3266 cur = cursorMin(cur, cm.getCursor('anchor'));
3267 }
3268 return cur;
3269 }
3270
3271 /**
3272 * If moveHead is set to false, the CodeMirror selection will not be

Callers 1

expandWordUnderCursorFunction · 0.85

Calls 2

cursorMinFunction · 0.85
getSelectionMethod · 0.80

Tested by

no test coverage detected