We now clear the “hidden extension” flag if the user manually adds it.
We also ensure the hidden extension is not ignored by comparing base name with display name. The flag is ignored under certain circumstances.
Comparing base name with display name alone may give a false positive for localized file names.
The implementation of kPaste seems to generate an exception for some users, but I don’t know exactly why, so this should provide some better diagnostics info.
This was disabled in an attempt of avoiding the “do you want to open saved documents from last session?” which appear after a crash.
It doesn’t seem to have any effect though, so just noise in the code.
We previously used a dictionary so that initializing a bundle item object wouldn’t need to know the difference between a full property list and a cached subset. Technically though the previous code had an implicit assertion on the bundle item not being able to rely on the settings values being useful, which is now gone.
The main advantage though is a smaller and more correct cache format.
Effectively it doesn’t change much as cached items are fetched with a file date, but in theory it should now be possible to omit that date (if we can trust that fs-events has always notified us about disk changes).
Since it’s not unlikely that a user will downgrade from a nightly build, we should be prepared to see cache files using a newer (incompatible) file format.
Recording that an item is deleted in the bundle’s info.plist is necessary for TextMate 1.x because it merges all installed bundles, so if the user has a local version, he will still see items from the default version, unless these are indicated to be deleted in the local version.
With 2.0 only delta bundles get merged with a less-local bundle, and when deleting a default item, a delta item is written with the ‘isDeleted’ key set to true.
We need this in a few places and while calling Gestalt() isn’t that much code, that function is deprecated in 10.8 and the alternative is a lot more code, so we don’t want to repeat that once we update the code.
The menu contains two (non-selectable) “actions”. If we use a pop-up, we have to change the selection after the user select one of these actions, which isn’t the case with a pull-down menu.
This means we don’t need to know if there is a selection when creating the menu items and long-term it’ll be easier to introduce more complex updating, e.g. make the title a format string to allow referencing TM_DISPLAYNAME or disable the menu item if its requirements cannot be met.
Since we create an attributed title when the menu item has a tab trigger or “inactive” key equivalent, we can’t later update the title via the title property.
When using an integer it got “pretty printed” by NSTextField (to have a thousand separator). If the user would “commit” this version, the version with the thousand separator would be stored in user defaults, which would make TextMate fail t listen to the desired port.
Now that the bundle menu doesn’t register any key equivalents, there is no need to manually go through all but the bundle menu to avoid having the system trigger bundle menu items.
The rendering doesn’t mimic the system 100%, for example the key equivalents are not centered on the split between modifiers and the key, nor are F-keys rendered using a smaller font / menu glyph.
On the plus side though, now all keys are rendered. Previously keys shared with other (non bundle) menu items would only be shown for one of the items sharing the key, and some keys would simply not be shown (e.g. ⌃#).
Also, bundle menu items no longer “eclipse” regular menu items, which could previously happen even when the bundle menu item wouldn’t fire (as it was scoped for something else than the current context).
Fixes#894.
Previously shifting text left/right would ignore blank lines (as noted in issue #419).
When shifting left though it does make sense to delete whitespace, especially as the same code is used to re-indent when pasting.
Fixes#810.
This will give the matched lines zero indent but without affecting the following lines.
Probably the only use-case for this is C preprocessor directives.