Skip to content

Commit

Permalink
Auto open new terminal once
Browse files Browse the repository at this point in the history
  • Loading branch information
pastuxso committed Nov 8, 2024
1 parent 19f9cac commit 8a79565
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/extension/features/autoOpenTerminal.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { commands } from 'vscode'

import { FeatureName } from '../../types'
import ContextState from '../contextState'

import { isOnInContextState } from '.'

Expand All @@ -9,5 +10,8 @@ export async function autoOpenTerminal() {
return
}

await commands.executeCommand('workbench.action.terminal.new')
if (!ContextState.getKey<boolean>(FeatureName.AutoOpenTerminal)) {
await commands.executeCommand('workbench.action.terminal.new')
ContextState.addKey(FeatureName.AutoOpenTerminal, true)
}
}

0 comments on commit 8a79565

Please sign in to comment.