@@ -48,6 +48,7 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
4848 this . _contextMenuUntracked = new Menu ( { commands } ) ;
4949 this . _contextMenuUntrackedMin = new Menu ( { commands } ) ;
5050 this . _contextMenuSimpleUntracked = new Menu ( { commands } ) ;
51+ this . _contextMenuSimpleUntrackedMin = new Menu ( { commands } ) ;
5152 this . _contextMenuSimpleTracked = new Menu ( { commands } ) ;
5253
5354 this . state = {
@@ -231,9 +232,17 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
231232 this . _contextMenuSimpleTracked . addItem ( { command } ) ;
232233 } ) ;
233234
234- [ CommandIDs . gitFileOpen ] . forEach ( command => {
235+ [
236+ CommandIDs . gitFileOpen ,
237+ CommandIDs . gitIgnore ,
238+ CommandIDs . gitIgnoreExtension
239+ ] . forEach ( command => {
235240 this . _contextMenuSimpleUntracked . addItem ( { command } ) ;
236241 } ) ;
242+
243+ [ CommandIDs . gitFileOpen , CommandIDs . gitIgnore ] . forEach ( command => {
244+ this . _contextMenuSimpleUntrackedMin . addItem ( { command } ) ;
245+ } ) ;
237246 }
238247
239248 /** Handle right-click on a staged file */
@@ -262,7 +271,12 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
262271 /** Handle right-click on an untracked file in Simple mode*/
263272 contextMenuSimpleUntracked = ( event : React . MouseEvent ) => {
264273 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+ }
266280 } ;
267281
268282 /** Handle right-click on an tracked file in Simple mode*/
@@ -813,4 +827,5 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
813827 private _contextMenuUntrackedMin : Menu ;
814828 private _contextMenuSimpleTracked : Menu ;
815829 private _contextMenuSimpleUntracked : Menu ;
830+ private _contextMenuSimpleUntrackedMin : Menu ;
816831}
0 commit comments