You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for taking this one. I'm the one that filed he original bug, so obviously it bugs me :)
I think hard-coding the second param works for you because you only tested closing the file with the x icon. Try this:
Open 2 files in working set
Make second file dirty
Select first file
Close first file using File > Close
Results: Remaining file should have dirty flag, but it has x icon.
It has the x icon because the third param is hard-coded to true. After fixing that, the dirty flag still is not set because the second param is hard-coded to false. Both need to be determined. Here's what I did, but give it some more testing to see if there are other cases:
var $nextListItem = $listItem.next();
if ($nextListItem && $nextListItem.length > 0) {
var canClose = ($nextListItem.find(".can-close").length === 1);
var isDirty = isOpenAndDirty($nextListItem.data(_FILE_KEY));
_updateFileStatusIcon($nextListItem, isDirty, canClose);
}
Note that $listItem.next() always returns an Object -- you need to make sure length > 0;
Also, Brackets requires tabbing of 4 spaces and passing JSLint (which you can turn on using View > JSLint).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close file icon is not displayed until mouse is moved.
Fix for issue #104 on the mac.