MCPcopy Index your code
hub / github.com/codeaashu/claude-code / fromReplace

Function fromReplace

src/vim/transitions.ts:438–448  ·  view source on GitHub ↗
(
  state: { type: 'replace'; count: number },
  input: string,
  ctx: TransitionContext,
)

Source from the content-addressed store, hash-verified

436}
437
438function fromReplace(
439 state: { type: 'replace'; count: number },
440 input: string,
441 ctx: TransitionContext,
442): TransitionResult {
443 // Backspace/Delete arrive as empty input in literal-char states. In vim,
444 // r<BS> cancels the replace; without this guard, executeReplace("") would
445 // delete the character under the cursor instead.
446 if (input === '') return { next: { type: 'idle' } }
447 return { execute: () => executeReplace(input, state.count, ctx) }
448}
449
450function fromIndent(
451 state: { type: 'indent'; dir: '>' | '<'; count: number },

Callers 1

transitionFunction · 0.85

Calls 1

executeReplaceFunction · 0.85

Tested by

no test coverage detected