File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,15 @@ export class AlicloudAPIService {
167
167
168
168
async openInCode ( codeInfo : { code : string ; language : string } ) {
169
169
const { language, code } = codeInfo ;
170
+ const getViewColumn = ( ) => {
171
+ if ( vscode . window . visibleTextEditors . length > 0 ) {
172
+ return vscode . ViewColumn . One ;
173
+ } else {
174
+ return vscode . ViewColumn . Beside ;
175
+ }
176
+ } ;
177
+ const column = getViewColumn ( ) ;
178
+
170
179
// 创建新的文件
171
180
vscode . workspace
172
181
. openTextDocument ( {
@@ -175,7 +184,7 @@ export class AlicloudAPIService {
175
184
} )
176
185
. then ( ( newDocument ) => {
177
186
vscode . window . showTextDocument ( newDocument , {
178
- viewColumn : vscode . ViewColumn . Beside ,
187
+ viewColumn : column ,
179
188
} ) ;
180
189
} ) ;
181
190
return { } ;
You can’t perform that action at this time.
0 commit comments