✨ feat(vscode): 设置可关新开终端分屏
This commit is contained in:
1 parent
7463113170
commit
ffae9ce2b8
11 files changed
+66
-7
No files matched your search
@@ -4,16 +4,14 @@ import type {
|
||||
} from 'vscode'
|
||||
import type { Issue } from '../../gitea/types'
|
||||
import type { KanbanWebviewPanel } from '../KanbanPanel'
|
||||
import { ViewColumn, window } from 'vscode'
|
||||
import { window } from 'vscode'
|
||||
import { logger } from '../../logging/logger'
|
||||
import { getSettings } from '../../settings/store'
|
||||
import { terminalEditorColumn } from '../terminalColumn'
|
||||
|
||||
export function resolveTerminalLocation(panel: KanbanWebviewPanel | null, preserveFocus: boolean): TerminalEditorLocationOptions {
|
||||
void panel
|
||||
// Pin all plugin-managed terminals to editor group 2 (right side of the
|
||||
// kanban panel in column 1). VS Code creates the group on demand if it
|
||||
// doesn't exist yet, and stacks new terminals as tabs in that group when
|
||||
// it does — exactly what we want, no manual scan of existing tabs needed.
|
||||
return { viewColumn: ViewColumn.Two, preserveFocus }
|
||||
const split = panel ? getSettings(panel.context).splitNewTerminals : true
|
||||
return { viewColumn: terminalEditorColumn(split), preserveFocus }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user