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

Function processTextCursorLeft

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

Source from the content-addressed store, hash-verified

3604 )
3605
3606const processTextCursorLeft = (state: TextState) => {
3607 if (state.cursor <= 0) {
3608 return Effect.succeed(Action.Beep())
3609 }
3610 const cursor = state.cursor - 1
3611 return Effect.succeed(
3612 Action.NextFrame({
3613 state: { ...state, cursor, error: Option.none() }
3614 })
3615 )
3616}
3617
3618const processTextCursorRight = (state: TextState) => {
3619 if (state.cursor >= state.value.length) {

Callers 1

handleTextProcessFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected