(dir, unit)
| 1476 | return {line: line, ch: ch}; |
| 1477 | } |
| 1478 | function moveH(dir, unit) { |
| 1479 | var pos = dir < 0 ? sel.from : sel.to; |
| 1480 | if (shiftSelecting || posEq(sel.from, sel.to)) pos = findPosH(dir, unit); |
| 1481 | setCursor(pos.line, pos.ch, true); |
| 1482 | } |
| 1483 | function deleteH(dir, unit) { |
| 1484 | if (!posEq(sel.from, sel.to)) replaceRange("", sel.from, sel.to); |
| 1485 | else if (dir < 0) replaceRange("", findPosH(dir, unit), sel.to); |