From d012ed12c308b66fe6bd3ebd2dee7980d7ce23ed Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Sun, 15 Dec 2024 23:11:19 +0800 Subject: [PATCH] moar --- apps/studio/components/interfaces/SQLEditor/MonacoEditor.tsx | 4 ++++ apps/studio/components/layouts/tabs/new-tab.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/studio/components/interfaces/SQLEditor/MonacoEditor.tsx b/apps/studio/components/interfaces/SQLEditor/MonacoEditor.tsx index 4b05881848d..5c201b4b0d9 100644 --- a/apps/studio/components/interfaces/SQLEditor/MonacoEditor.tsx +++ b/apps/studio/components/interfaces/SQLEditor/MonacoEditor.tsx @@ -15,6 +15,7 @@ import { Admonition } from 'ui-patterns' import { untitledSnippetTitle } from './SQLEditor.constants' import type { IStandaloneCodeEditor } from './SQLEditor.types' import { createSqlSnippetSkeletonV2 } from './SQLEditor.utils' +import { makeActiveTabPermanent } from 'state/tabs' export type MonacoEditorProps = { id: string @@ -120,6 +121,9 @@ const MonacoEditor = ({ }, 1000) function handleEditorChange(value: string | undefined) { + // make active tab permanent + makeActiveTabPermanent(ref) + const snippetCheck = snapV2.snippets[id] if (id && value) { diff --git a/apps/studio/components/layouts/tabs/new-tab.tsx b/apps/studio/components/layouts/tabs/new-tab.tsx index 7d8d0be4a57..a2569f26802 100644 --- a/apps/studio/components/layouts/tabs/new-tab.tsx +++ b/apps/studio/components/layouts/tabs/new-tab.tsx @@ -59,7 +59,7 @@ export function NewTab() { return (
-
+
{actions.map((item, i) => (