@@ -56,6 +56,7 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
56
56
this . _contextMenuUntracked = new Menu ( { commands } ) ;
57
57
this . _contextMenuUntrackedMin = new Menu ( { commands } ) ;
58
58
this . _contextMenuSimpleUntracked = new Menu ( { commands } ) ;
59
+ this . _contextMenuSimpleUntrackedMin = new Menu ( { commands } ) ;
59
60
this . _contextMenuSimpleTracked = new Menu ( { commands } ) ;
60
61
61
62
this . state = {
@@ -239,9 +240,17 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
239
240
this . _contextMenuSimpleTracked . addItem ( { command } ) ;
240
241
} ) ;
241
242
242
- [ CommandIDs . gitFileOpen ] . forEach ( command => {
243
+ [
244
+ CommandIDs . gitFileOpen ,
245
+ CommandIDs . gitIgnore ,
246
+ CommandIDs . gitIgnoreExtension
247
+ ] . forEach ( command => {
243
248
this . _contextMenuSimpleUntracked . addItem ( { command } ) ;
244
249
} ) ;
250
+
251
+ [ CommandIDs . gitFileOpen , CommandIDs . gitIgnore ] . forEach ( command => {
252
+ this . _contextMenuSimpleUntrackedMin . addItem ( { command } ) ;
253
+ } ) ;
245
254
}
246
255
247
256
/** Handle right-click on a staged file */
@@ -270,7 +279,12 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
270
279
/** Handle right-click on an untracked file in Simple mode*/
271
280
contextMenuSimpleUntracked = ( event : React . MouseEvent ) => {
272
281
event . preventDefault ( ) ;
273
- this . _contextMenuSimpleUntracked . open ( event . clientX , event . clientY ) ;
282
+ const extension = PathExt . extname ( this . state . selectedFile . to ) ;
283
+ if ( extension . length > 0 ) {
284
+ this . _contextMenuSimpleUntracked . open ( event . clientX , event . clientY ) ;
285
+ } else {
286
+ this . _contextMenuSimpleUntrackedMin . open ( event . clientX , event . clientY ) ;
287
+ }
274
288
} ;
275
289
276
290
/** Handle right-click on an tracked file in Simple mode*/
@@ -821,4 +835,5 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
821
835
private _contextMenuUntrackedMin : Menu ;
822
836
private _contextMenuSimpleTracked : Menu ;
823
837
private _contextMenuSimpleUntracked : Menu ;
838
+ private _contextMenuSimpleUntrackedMin : Menu ;
824
839
}
0 commit comments