MCPcopy Create free account
hub / github.com/Effect-TS/effect / processTextCursorRight

Function processTextCursorRight

packages/effect/src/unstable/cli/Prompt.ts:3618–3628  ·  view source on GitHub ↗
(state: TextState)

Source from the content-addressed store, hash-verified

3616}
3617
3618const processTextCursorRight = (state: TextState) => {
3619 if (state.cursor >= state.value.length) {
3620 return Effect.succeed(Action.Beep())
3621 }
3622 const cursor = Math.min(state.cursor + 1, state.value.length)
3623 return Effect.succeed(
3624 Action.NextFrame({
3625 state: { ...state, cursor, error: Option.none() }
3626 })
3627 )
3628}
3629
3630const processTextCursorStart = (state: TextState) =>
3631 Effect.succeed(

Callers 1

handleTextProcessFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected