This is instead of setting an environment variable. Since there already is a user defaults setting for whether or not we want an untitled document created at startup, it seems nicer to have mate set that, instead of effectively introducing an alias for the setting.
Using instances with static storage in Objective-C files result in the following warning (starting with clang 425.0.24):
ld: warning: direct access in […] to global weak symbol […] means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
Selecting already selected page no longer reloads the HTML.
In addition to ⌘1-n for the n’th page, you can now also use ⌘{ and ⌘} to move between pages.
The former is mainly to allow using Open With from inside TextMate (to force open the document with TextMate), as you likely have Xcode setup as the default app to handle xib files.
We manually handle the Bundles menu (like before) and now use performActionForItemAtIndex: to make the menu flash (although presently only for the default items).
For the other menus we now call super and let that handle it. This means it might go into the Bundles menu, even though or menu delegate (for that menu) will say there are no key equivalents. This is only a problem for keys which do match items, but where all the items it matches are not supposed to fire.
My memory is a little vague here, but I believe the point of handling the menu keys was to workaround a bug in NSMenu.
The bug was that NSMenu would look at (the target of) cached menu items, probably for UI validation, so potentially sending methods to unretained objects, which could lead to a crash. Several workarounds were attempted (like clearing the target property after the menu had been displayed) but the only effective one was overloading key handling.
I’m quite sure though that this bug is no longer relevant.
Removed the ability to specify wether documents should open in current window or a new window — all documents opened via this API will go through the same algorithm to find where the documents should end up (more choice is just adding confusion and complexity).
It didn’t really make sense as an instance method since it iterate all instances, and we also want to execute code incase of no instances (save that fact as session data).
Since everything about session is now contained in the DocumentController class there is no need for invoking this from elsewhere and thus no need for the previous indirection.
Previously we would let NSURL parse the parameter and ask for the path component. This however does not support tilde as shorthand for the user’s home directory, and certainly not with TextMate 1.x’s questionable syntax (using ‘file://~/«file»’ instead of ‘file://localhost/~/«file»’ or possibly ‘file:///~/«file»’ although this one seems a little wrong).
As for percent escapes, the issue here is that if the URL parameter escapes slashes or colons, not decoding the URL parameter before creating an NSURL instance will fail (as the URL is malformed). If however we do decode percent escapes and the URL parameter contains spaces, then NSURL will also fail, as a URL with spaces is malformed.
So I ended up bypassing NSURL and check for a few variants of a ‘file://’ prefix (which is also what TextMate 1.x did).
This closes issue #602.
This is only if the project directory is actually set at the time the default properties are expanded, so presently this has no effect (but will when TextMate sets a default value for the projectDirectory variable).
This can be used to link to the “current document” even if that document has no path. Previously this was done by leaving out the ‘url’ parameter, which made it target the frontmost document — using ‘uuid’ is a more robust way to achieve the same.
A command can read the TM_DOCUMENT_UUID environment variable for the current document’s identifier.
We regularly iterate through all open windows and test if these are document controller windows. It will be easier to let the document controller class (or application delegate) manage a list of open document windows, as we anyway need some sort of owner with ARC (currently the instances own themselves and give up ownership in windowWillClose: which cause them to be released).
We now remember values like file browser history even if the file browser is not shown while saving session state (but has previously been, or state was provided during setup). We also use the file browser and HTML output sizes stored in the session info (previously we only used values from NSUserDefaults).
The menu item within is not hooked up to anything (as mentioned in issue #650) and as my idea for finishing the indent settings UI does not involve this menu item, I am removing it to avoid further confusion.
This key was previously assigned to File → Page Setup but as we currently don’t support that, and it is likely not going to see that big a use (when implemented) I think we can live without a key equivalent for that menu action.
Closes issue #525.
If user opens the dialog on one space, moves to another space (with a TextMate window) and then re-activate the (already open) dialog, it would previously switch back to the space containing the dialog, whereas with the changed setting, it now moves the dialog to the active space.
This should address issue #599.
If the plug-in doesn’t set TMPlugInAPIVersion to 2 (in its Info.plist) a dialog will show, telling the user that the plug-in is not compatible with the current version of TextMate (which is most likely correct).
You can hold down option (⌥) to open the plug-in as a regular folder.
Addresses issue #392.