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

Function deleteH

mini-code-editor/cm/lib/codemirror.js:1283–1288  ·  view source on GitHub ↗
(dir, unit)

Source from the content-addressed store, hash-verified

1281 setCursor(pos.line, pos.ch, true);
1282 }
1283 function deleteH(dir, unit) {
1284 if (!posEq(sel.from, sel.to)) replaceRange("", sel.from, sel.to);
1285 else if (dir < 0) replaceRange("", findPosH(dir, unit), sel.to);
1286 else replaceRange("", sel.from, findPosH(dir, unit));
1287 userSelChange = true;
1288 }
1289 var goalColumn = null;
1290 function moveV(dir, unit) {
1291 var dist = 0, pos = localCoords(sel.inverted ? sel.from : sel.to, true);

Callers

nothing calls this directly

Calls 3

posEqFunction · 0.85
replaceRangeFunction · 0.85
findPosHFunction · 0.85

Tested by

no test coverage detected