This can be disabled using:
defaults write com.macromates.TextMate.preview disableBundleSuggestions -bool YES
Though the user can also hold option and select “Never” for a suggestions to never see that again, and once the user has a custom binding for a document’s type, no suggestion will be shown.
If OakDocument itself is unable to find one we look at the fileType .tm_properties setting, either looking it up using ‘attr.untitled’ for untitled documents, or ‘attr.file.unknown-type’ for documents with a path.
If nothing is found we fallback to ‘text.plain’.
If there is no custom binding and no installed grammar matches the document (based on content or path extension) then we leave the document without a file type and expect the caller (of loadModalForWindow:completionHandler:) to set the file type (in the completion handler).
The caller can consult online bundles, present UI to the user, and also know about “project directory”, so they can make a better choice than the OakDocument.
We now have an Objective-C type that can be used in the UI to show various properties of a bundle.
This commit breaks compatibility with the current bundles preferences page.
The old implementation in document_t would check the status in the getter when the document wasn’t open, since we only observe the disk for open documents.
Such solution though would not support key/value observing.
We could improve performance slightly by accepting an “isOnDisk” flag in the initializer since when we create documents from scanning the disk (folder search and file chooser) we already know the document is on disk and thus could skip the extra disk access.
When we close a tab then we select the tab to the left, for this reason it makes most sense to select the last tab added, so that ⌘W will effectively go to the “next tab inserted”.
The exception is when we create a new project, here we select the first tab since there are no tabs to the left, so ⌘W will still work as a “next tab” button. Though I may later change this so that the behavior is consistent.
I believe this used to be a requirement (presumably since a const reference can be treated as a pointer by Objective-C) but recent versions of clang have no problem with complex C++ data types in Objective-C class interfaces.
Based on crash reports received it might be that this function is sometimes called without a window, although the call-sites all do pass a window to the function.
The button will show “Replace Selected” if either not all results are selected
or when all results are selected, replacement has been done for only some of the files with matches.
Validation of the Check/Uncheck All menu items has also been improved.
It does seem redundant with four counters for the FFResultNode but this is required for efficient bindings since the state of the “Replace All / Selected” button depend on all these things.
At the same time the semantics have been simplified so that the ‘readOnly’ property (formerly ‘ignored’) does not have any side effects with respect to whether or not the item is excluded.
The only thing special is that when a node is set to be read-only, a change of its ‘exclude’ property will not be forwarded to its children.