@@ -48,6 +48,7 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
48
48
this . _contextMenuUntracked = new Menu ( { commands } ) ;
49
49
this . _contextMenuUntrackedMin = new Menu ( { commands } ) ;
50
50
this . _contextMenuSimpleUntracked = new Menu ( { commands } ) ;
51
+ this . _contextMenuSimpleUntrackedMin = new Menu ( { commands } ) ;
51
52
this . _contextMenuSimpleTracked = new Menu ( { commands } ) ;
52
53
53
54
this . state = {
@@ -231,9 +232,17 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
231
232
this . _contextMenuSimpleTracked . addItem ( { command } ) ;
232
233
} ) ;
233
234
234
- [ CommandIDs . gitFileOpen ] . forEach ( command => {
235
+ [
236
+ CommandIDs . gitFileOpen ,
237
+ CommandIDs . gitIgnore ,
238
+ CommandIDs . gitIgnoreExtension
239
+ ] . forEach ( command => {
235
240
this . _contextMenuSimpleUntracked . addItem ( { command } ) ;
236
241
} ) ;
242
+
243
+ [ CommandIDs . gitFileOpen , CommandIDs . gitIgnore ] . forEach ( command => {
244
+ this . _contextMenuSimpleUntrackedMin . addItem ( { command } ) ;
245
+ } ) ;
237
246
}
238
247
239
248
/** Handle right-click on a staged file */
@@ -262,7 +271,12 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
262
271
/** Handle right-click on an untracked file in Simple mode*/
263
272
contextMenuSimpleUntracked = ( event : React . MouseEvent ) => {
264
273
event . preventDefault ( ) ;
265
- this . _contextMenuSimpleUntracked . open ( event . clientX , event . clientY ) ;
274
+ const extension = PathExt . extname ( this . state . selectedFile . to ) ;
275
+ if ( extension . length > 0 ) {
276
+ this . _contextMenuSimpleUntracked . open ( event . clientX , event . clientY ) ;
277
+ } else {
278
+ this . _contextMenuSimpleUntrackedMin . open ( event . clientX , event . clientY ) ;
279
+ }
266
280
} ;
267
281
268
282
/** Handle right-click on an tracked file in Simple mode*/
@@ -813,4 +827,5 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
813
827
private _contextMenuUntrackedMin : Menu ;
814
828
private _contextMenuSimpleTracked : Menu ;
815
829
private _contextMenuSimpleUntracked : Menu ;
830
+ private _contextMenuSimpleUntrackedMin : Menu ;
816
831
}
0 commit comments