@@ -818,7 +818,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
818
818
this . _linkManager . openRecentLink ( type ) ;
819
819
}
820
820
821
- async runRecent ( type : 'command' | 'cwd' , filterMode ?: 'fuzzy' | 'contiguous' ) : Promise < void > {
821
+ async runRecent ( type : 'command' | 'cwd' , filterMode ?: 'fuzzy' | 'contiguous' , value ?: string ) : Promise < void > {
822
822
if ( ! this . xterm ) {
823
823
return ;
824
824
}
@@ -969,14 +969,13 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
969
969
quickPick . items = [ ...originalItems ] ;
970
970
quickPick . sortByLabel = false ;
971
971
quickPick . placeholder = placeholder ;
972
- quickPick . title = 'Run Recent Command' ;
973
972
quickPick . customButton = true ;
974
973
quickPick . matchOnLabel = filterMode === 'fuzzy' ;
975
974
if ( filterMode === 'fuzzy' ) {
976
975
quickPick . customLabel = nls . localize ( 'terminal.contiguousSearch' , 'Use Contiguous Search' ) ;
977
976
quickPick . onDidCustom ( ( ) => {
978
977
quickPick . hide ( ) ;
979
- this . runRecent ( type , 'contiguous' ) ;
978
+ this . runRecent ( type , 'contiguous' , quickPick . value ) ;
980
979
} ) ;
981
980
} else {
982
981
// contiguous is the default for command
@@ -999,7 +998,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
999
998
quickPick . customLabel = nls . localize ( 'terminal.fuzzySearch' , 'Use Fuzzy Search' ) ;
1000
999
quickPick . onDidCustom ( ( ) => {
1001
1000
quickPick . hide ( ) ;
1002
- this . runRecent ( type , 'fuzzy' ) ;
1001
+ this . runRecent ( type , 'fuzzy' , quickPick . value ) ;
1003
1002
} ) ;
1004
1003
}
1005
1004
quickPick . onDidTriggerItemButton ( async e => {
@@ -1034,6 +1033,9 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
1034
1033
this . sendText ( type === 'cwd' ? `cd ${ result . label } ` : result . label , ! quickPick . keyMods . alt ) ;
1035
1034
quickPick . hide ( ) ;
1036
1035
} ) ;
1036
+ if ( value ) {
1037
+ quickPick . value = value ;
1038
+ }
1037
1039
return new Promise < void > ( r => {
1038
1040
quickPick . show ( ) ;
1039
1041
quickPick . onDidHide ( ( ) => r ( ) ) ;
0 commit comments