File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -358,9 +358,11 @@ final class MainContentCommandActions {
358358 return
359359 }
360360
361- // Data grid changes take priority (synced to sidebar editState,
362- // and the data grid path uses the correct plugin driver for SQL generation)
363- if coordinator. changeManager. hasChanges {
361+ // Data grid changes or pending table operations take priority
362+ let hasDataChanges = coordinator. changeManager. hasChanges
363+ || !pendingTruncates. wrappedValue. isEmpty
364+ || !pendingDeletes. wrappedValue. isEmpty
365+ if hasDataChanges {
364366 let saved = await withCheckedContinuation { continuation in
365367 coordinator. saveCompletionContinuation = continuation
366368 saveChanges ( )
@@ -378,6 +380,13 @@ final class MainContentCommandActions {
378380 return
379381 }
380382
383+ // File save (query editor with source file)
384+ if coordinator. tabManager. selectedTab? . isFileDirty == true {
385+ saveFileToSourceURL ( )
386+ performClose ( )
387+ return
388+ }
389+
381390 performClose ( )
382391 }
383392
You can’t perform that action at this time.
0 commit comments