MCPcopy Index your code
hub / github.com/Effect-TS/effect / processCursorRight

Function processCursorRight

packages/cli/src/internal/prompt/text.ts:206–216  ·  view source on GitHub ↗
(state: State)

Source from the content-addressed store, hash-verified

204}
205
206function processCursorRight(state: State) {
207 if (state.cursor >= state.value.length) {
208 return Effect.succeed(Action.Beep())
209 }
210 const cursor = Math.min(state.cursor + 1, state.value.length)
211 return Effect.succeed(
212 Action.NextFrame({
213 state: { ...state, cursor, error: Option.none() }
214 })
215 )
216}
217
218function processTab(state: State, options: Options) {
219 if (state.value === options.default) {

Callers 1

handleProcessFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected