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.
This solves the problem where we need to estimate the current line’s indent, but the lines above it is a multi-line block comment. Previously we would fetch indent patterns based on the current scope, then find the first line above caret, for which the patterns can be used to estimate the indent. The problem is that the commented lines without comment markers would be treated as code, and used for the indent.
With the new approach, we can set different patterns for ‘comment.block’ (the C bundle already does this), which basically ignore all the lines, which will cause TextMate to use the code above the comment to estimate indent.
This commit closestextmate/c.tmbundle#3 and also closestextmate/php.tmbundle#24.
This item had no key equivalent and the find dialog automatically uses “selection” if the current document has a multi-line selection, so I don’t see any need for this menu item.
Also removed the key equivalent for “Find in Folder…” — the key equivalent wasn’t memorable and I don’t see a big need for this item, since one can initiate searches from the file browser.