MCPcopy Create free account
hub / github.com/bytebase/bytebase / storeViewState

Function storeViewState

frontend/src/react/components/monaco/text-model.ts:33–39  ·  view source on GitHub ↗
(
  editor: MonacoType.editor.IStandaloneCodeEditor,
  model: MonacoType.editor.ITextModel | null | undefined
)

Source from the content-addressed store, hash-verified

31};
32
33export const storeViewState = (
34 editor: MonacoType.editor.IStandaloneCodeEditor,
35 model: MonacoType.editor.ITextModel | null | undefined
36) => {
37 if (!model) return;
38 viewStateMapByUri.set(model.uri.toString(), editor.saveViewState());
39};
40
41export const restoreViewState = (
42 editor: MonacoType.editor.IStandaloneCodeEditor,

Callers 1

MonacoEditorFunction · 0.90

Calls 2

toStringMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected