We now explicitly disable it for targets that hasn’t yet been upgraded to ARC. This way, it’s easier to get an overview of which targets hasn’t yet been upgraded and ensures new targets has ARC enabled.
The text view needs to do a little work before saving a document (serialize folded text) and with the window as part of the user data, we can now skip that for text views in windows for which documents are not going to be saved.
This is not an ideal solution; long-term saving will be moved up to the DocumentWindowController which has the full view of all documents and text views.
Since documents are loaded asynchronously and we trigger a request for the first tab’s document, this might finish loading after the selected tab’s document, hence trigger a setDocument: after we loaded the selected document’s tab.
These are based on the potential save directory (i.e. the one showing in the file browser) and ensures pressing ⌥⌘N gives the new document proper project and SCM scopes (so ⌘Y and ⌘B works as expected).
This fixes issue #367.
We didn’t actually use the file itself, only its parent directory, and there are several places we want SCM info for an untitled file’s project directory, so removing the need for a file simplifies things.
If the window hadn’t been loaded yet, we previously had to delay opening the document when changing tab (in code).
Since we now create the window in the initializer, there is no longer need for this.
Since 10% of reported crashes are in synchronizeWindowTitle and seems to be about not having a proper document pointer, I am adding these checks and some debug output — don’t understand how we would get into this situation though.
It’s not feasible to maintain the old-style xib translations while we work on the UI. We’ll soon move fully to constraint-based layout which should allow translations to be purely string-based.
The main window has now moved fully to constraint based layout which makes it a lot easier to tweak the layout and fixes issue #145.
Presently the option to have HTML output on the right is not supported. It will likely be back with a few other options that have been requested.
The width of file browser and height of HTML output view is always read from defaults rather than restored from previous session. Effectively this results in the same behavior except when there are multiple windows with different sizing of these splits. Unsure if per-window sizes should be brought back.
There’s a few commands which want to read settings from the current theme. So far these have been reading the theme UUID from TextMate’s settings and scanned the disk to find the corresponding property list.
This is pretty bad because theme UUID can be set in different ways, themes can be in arbitrary bundles, and the property lists can be in delta format.
The latter is not solved, though we ensure the variable point to the base theme, incase a delta exist. TextMate could simply write a non-delta version of the theme to TMPDIR and let the variable point to that, so we’re not really limiting ourself by adding this variable.
__attribute__((format(...))) was added to NSAlert's class-based initializer in 10.7, and due to using string objects instead of literals as informative text, Clang is unable to guarantee the safety of the formatter, and, as such, issues a warning.
Variables customizing `windowTitle` such as `$TM_SCM_BRANCH` can change while TM is inactive, while user is working in command line or different app. So it is better to refresh `windowTitle` once we get back to TM.
Unfortunately a printf precision specifier (‘%.*s’) can not come with a width specifier so we have to cast to int. The width specifier ‘t’ is used for ptrdiff_t.
The int → NSInteger change fixed a bug with popup menu positioning, but there was no associated warning or error. It's possible there are more such bugs that we haven't found yet!
After dragging the HTML Output window down below the bottom of the main
window it cannot be dragged back and negative height of HTML Output is
saved to file.
There is also a new document_t::encoding_for_save_as_path which returns the encoding that would be used for the document, if saved at the given path. If the document was loaded from disk, it will return the encoding used during load, otherwise it will check tmProperties for which encoding should be used for the path provided. Save dialog for untitled documents will be pre-populated with the result of the above function.
This can be used to close current, other, and tabs on the right. Additionally to create a new tab (to the right of the tab showing the menu) or open the tab in a new window.
Closes issue #191.