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

Function fromOperator

src/vim/transitions.ts:283–308  ·  view source on GitHub ↗
(
  state: { type: 'operator'; op: Operator; count: number },
  input: string,
  ctx: TransitionContext,
)

Source from the content-addressed store, hash-verified

281}
282
283function fromOperator(
284 state: { type: 'operator'; op: Operator; count: number },
285 input: string,
286 ctx: TransitionContext,
287): TransitionResult {
288 // dd, cc, yy = line operation
289 if (input === state.op[0]) {
290 return { execute: () => executeLineOp(state.op, state.count, ctx) }
291 }
292
293 if (/[0-9]/.test(input)) {
294 return {
295 next: {
296 type: 'operatorCount',
297 op: state.op,
298 count: state.count,
299 digits: input,
300 },
301 }
302 }
303
304 const result = handleOperatorInput(state.op, state.count, input, ctx)
305 if (result) return result
306
307 return { next: { type: 'idle' } }
308}
309
310function fromOperatorCount(
311 state: {

Callers 1

transitionFunction · 0.85

Calls 2

executeLineOpFunction · 0.85
handleOperatorInputFunction · 0.85

Tested by

no test coverage detected