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

Function processCursorLeft

packages/cli/src/internal/prompt/date.ts:162–175  ·  view source on GitHub ↗
(state: State)

Source from the content-addressed store, hash-verified

160}
161
162function processCursorLeft(state: State) {
163 const previousPart = state.dateParts[state.cursor].previousPart()
164 return Option.match(previousPart, {
165 onNone: () => Action.Beep(),
166 onSome: (previous) =>
167 Action.NextFrame({
168 state: {
169 ...state,
170 typed: "",
171 cursor: state.dateParts.indexOf(previous)
172 }
173 })
174 })
175}
176
177function processCursorRight(state: State) {
178 const nextPart = state.dateParts[state.cursor].nextPart()

Callers 1

handleProcessFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…