They will be disabled too as the selected entry is both first and last (and only) entry.

-------- Ursprüngliche Nachricht --------
Von: Tomás Malbrán <notifications@github.com> 
Datum: 17.11.2013  21:47  (GMT+01:00) 
An: adobe/brackets <brackets@noreply.github.com> 
Cc: Marcel Gerber <mg.hain@gmx.de> 
Betreff: Re: [brackets] [Close Others] Fix #6019: Contextual Close Others menu entries (#6020) 
 
In src/extensions/default/CloseOthers/main.js:

> @@ -60,6 +60,33 @@ define(function (require, exports, module) {
>          CommandManager.execute(Commands.FILE_CLOSE_LIST, {documentList: docList});
>      }
>  
> +    function _currentDocChangedHandler() {
> +        var doc = dm.getCurrentDocument();
> +        
> +        if (doc) {
> +            var docIndex   = dm.findInWorkingSet(doc.file.fullPath),
> +                workingSet = dm.getWorkingSet().slice(0);
> +            
> +            if (docIndex === workingSet.length - 1) { // hide "Close Others Below" when the last file in Working Files is selected
> +                CommandManager.get(close_below).setEnabled(false);
> +            } else {
> +                CommandManager.get(close_below).setEnabled(true);
> +            }
> +            
> +            if (workingSet.length === 1) { // hide "Close Others" when there is only one file in Working Files
In this case, all the commands should be disabled, since you can't close other files.

—
Reply to this email directly or view it on GitHub.