MCPcopy Create free account
hub / github.com/B33pBeeps/redthread / CycleActive

Method CycleActive

internal/app/notes.go:316–325  ·  view source on GitHub ↗

CycleActive moves the active index by `delta`, wrapping around.

(delta int)

Source from the content-addressed store, hash-verified

314
315// CycleActive moves the active index by `delta`, wrapping around.
316func (w *Workspace) CycleActive(delta int) {
317 if len(w.Boards) == 0 {
318 return
319 }
320 w.ActiveIdx += delta
321 for w.ActiveIdx < 0 {
322 w.ActiveIdx += len(w.Boards)
323 }
324 w.ActiveIdx %= len(w.Boards)
325}
326
327// AddBoard appends a fresh board with a unique grain seed and makes it
328// active. Returns the new board.

Callers 1

handleBoardKeyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected