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

Function operateOnWord

src/codemirror.js:9166–9170  ·  view source on GitHub ↗
(cm, op)

Source from the content-addressed store, hash-verified

9164 }
9165
9166 function operateOnWord(cm, op) {
9167 var start = cm.getCursor(), end = cm.findPosH(start, 1, "word");
9168 cm.replaceRange(op(cm.getRange(start, end)), start, end);
9169 cm.setCursor(end);
9170 }
9171
9172 function toEnclosingExpr(cm) {
9173 var pos = cm.getCursor(), line = pos.line, ch = pos.ch;

Callers 1

codemirror.jsFile · 0.85

Calls 5

getCursorMethod · 0.80
findPosHMethod · 0.80
replaceRangeMethod · 0.80
getRangeMethod · 0.80
setCursorMethod · 0.80

Tested by

no test coverage detected