File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
extensions/typescript-language-features/src/languageFeatures Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,6 @@ class MoveToFileRefactorCommand implements Command {
175
175
if ( response . type !== 'response' || ! response . body ) {
176
176
return ;
177
177
}
178
- const defaultUri = this . client . toResource ( response . body . newFileName ) ;
179
178
180
179
const selectExistingFileItem : vscode . QuickPickItem = {
181
180
label : vscode . l10n . t ( "Select existing file..." ) ,
@@ -226,14 +225,14 @@ class MoveToFileRefactorCommand implements Command {
226
225
const picked = await vscode . window . showOpenDialog ( {
227
226
title : vscode . l10n . t ( "Select move destination" ) ,
228
227
openLabel : vscode . l10n . t ( "Move to File" ) ,
229
- defaultUri
228
+ defaultUri : Utils . dirname ( document . uri ) ,
230
229
} ) ;
231
230
return picked ?. length ? this . client . toTsFilePath ( picked [ 0 ] ) : undefined ;
232
231
} else if ( picked === selectNewFileItem ) {
233
232
const picked = await vscode . window . showSaveDialog ( {
234
233
title : vscode . l10n . t ( "Select move destination" ) ,
235
234
saveLabel : vscode . l10n . t ( "Move to File" ) ,
236
- defaultUri,
235
+ defaultUri : this . client . toResource ( response . body . newFileName ) ,
237
236
} ) ;
238
237
return picked ? this . client . toTsFilePath ( picked ) : undefined ;
239
238
} else {
You can’t perform that action at this time.
0 commit comments