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

Function fromCount

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

Source from the content-addressed store, hash-verified

263}
264
265function fromCount(
266 state: { type: 'count'; digits: string },
267 input: string,
268 ctx: TransitionContext,
269): TransitionResult {
270 if (/[0-9]/.test(input)) {
271 const newDigits = state.digits + input
272 const count = Math.min(parseInt(newDigits, 10), MAX_VIM_COUNT)
273 return { next: { type: 'count', digits: String(count) } }
274 }
275
276 const count = parseInt(state.digits, 10)
277 const result = handleNormalInput(input, count, ctx)
278 if (result) return result
279
280 return { next: { type: 'idle' } }
281}
282
283function fromOperator(
284 state: { type: 'operator'; op: Operator; count: number },

Callers 1

transitionFunction · 0.85

Calls 1

handleNormalInputFunction · 0.85

Tested by

no test coverage detected