MCPcopy Index your code
hub / github.com/anomalyco/opencode / setSelection

Function setSelection

packages/tui/src/context/editor.ts:147–151  ·  view source on GitHub ↗
(selection: EditorSelection | undefined)

Source from the content-addressed store, hash-verified

145 const pending = new Map<number, string>()
146
147 const setSelection = (selection: EditorSelection | undefined) => {
148 const changed = editorSelectionKey(selection) !== editorSelectionKey(store.selection)
149 setStore("selection", selection)
150 if (changed) setStore("selectionSent", false)
151 }
152
153 const clearSelectionForReconnect = (options?: { resetZedSelectionKey?: boolean }) => {
154 if (preserveSelectionOnReconnect) {

Callers 5

connectFunction · 0.70
clearSelectionFunction · 0.70
createFunction · 0.50
warpFunction · 0.50

Calls 2

editorSelectionKeyFunction · 0.85
setStoreFunction · 0.85

Tested by

no test coverage detected