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

Function contractSelection

lib/web/CodeMirror/addon/edit/closebrackets.js:111–115  ·  view source on GitHub ↗
(sel)

Source from the content-addressed store, hash-verified

109 }
110
111 function contractSelection(sel) {
112 var inverted = CodeMirror.cmpPos(sel.anchor, sel.head) > 0;
113 return {anchor: new Pos(sel.anchor.line, sel.anchor.ch + (inverted ? -1 : 1)),
114 head: new Pos(sel.head.line, sel.head.ch + (inverted ? 1 : -1))};
115 }
116
117 function handleChar(cm, ch) {
118 var conf = getConfig(cm);

Callers 1

handleCharFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected