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

Function processTextCursorLeft

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

Source from the content-addressed store, hash-verified

3868 )
3869
3870const processTextCursorLeft = (state: TextState) => {
3871 if (state.cursor <= 0) {
3872 return Effect.succeed(Action.Beep())
3873 }
3874 const cursor = state.cursor - 1
3875 return Effect.succeed(
3876 Action.NextFrame({
3877 state: { ...state, cursor, error: Option.none() }
3878 })
3879 )
3880}
3881
3882const processTextCursorRight = (state: TextState) => {
3883 if (state.cursor >= state.value.length) {

Callers 1

handleTextProcessFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected