6
6
import { localize } from 'vs/nls' ;
7
7
import { URI } from 'vs/base/common/uri' ;
8
8
import { Event } from 'vs/base/common/event' ;
9
+ import { Schemas } from 'vs/base/common/network' ;
9
10
import { CancellationToken , CancellationTokenSource } from 'vs/base/common/cancellation' ;
10
11
import { IWorkingCopyHistoryEntry , IWorkingCopyHistoryService } from 'vs/workbench/services/workingCopy/common/workingCopyHistory' ;
11
12
import { API_OPEN_DIFF_EDITOR_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands' ;
@@ -28,6 +29,7 @@ import { ILanguageService } from 'vs/editor/common/languages/language';
28
29
import { ILabelService } from 'vs/platform/label/common/label' ;
29
30
import { firstOrDefault } from 'vs/base/common/arrays' ;
30
31
import { LOCAL_HISTORY_DATE_FORMATTER , LOCAL_HISTORY_ICON_RESTORE , LOCAL_HISTORY_MENU_CONTEXT_KEY } from 'vs/workbench/contrib/localHistory/browser/localHistory' ;
32
+ import { IPathService } from 'vs/workbench/services/path/common/pathService' ;
31
33
32
34
const LOCAL_HISTORY_CATEGORY = { value : localize ( 'localHistory.category' , "Local History" ) , original : 'Local History' } ;
33
35
@@ -525,10 +527,11 @@ registerAction2(class extends Action2 {
525
527
const quickInputService = accessor . get ( IQuickInputService ) ;
526
528
const editorService = accessor . get ( IEditorService ) ;
527
529
const labelService = accessor . get ( ILabelService ) ;
530
+ const pathService = accessor . get ( IPathService ) ;
528
531
529
532
const resource = EditorResourceAccessor . getOriginalUri ( editorService . activeEditor , { supportSideBySide : SideBySideEditor . PRIMARY } ) ;
530
- if ( ! resource ) {
531
- return ;
533
+ if ( resource ?. scheme !== pathService . defaultUriScheme && resource ?. scheme !== Schemas . vscodeUserData ) {
534
+ return ; // only enable for selected schemes
532
535
}
533
536
534
537
const inputBox = quickInputService . createInputBox ( ) ;
0 commit comments