Skip to content

Commit

Permalink
Hide function signature editor when entered function is main. Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
kazcw committed Jan 22, 2025
1 parent a1e01fc commit e5d3991
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/gui/src/project-view/stores/rightDock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ export enum StorageMode {
export const [provideRightDock, useRightDock] = createContextStore(
'rightDock',
(graph: GraphStore, persisted: PersistedStore) => {
const inspectedAst = computed(() => unwrapOr(graph.methodAst, undefined))
const currentMethodAst = computed(() => unwrapOr(graph.methodAst, undefined))
const inspectedAst = computed(() =>
currentMethodAst.value?.name.code() !== 'main' ? currentMethodAst.value : undefined,
)
const inspectedMethodPointer = computed(() => unwrapOr(graph.currentMethodPointer, undefined))
const { user: userSettings } = useSettings()

const storageMode = ref(StorageMode.Default)
const markdownDocs = computed(() => inspectedAst.value?.mutableDocumentationMarkdown())
const markdownDocs = computed(() => currentMethodAst.value?.mutableDocumentationMarkdown())

const defaultVisible = computedFallback(
toRef(persisted, 'graphRightDock'),
Expand Down

0 comments on commit e5d3991

Please sign in to comment.