Additionally, we only re-use a window when the command is the same as what was last associated with the window. So doing a documentation lookup and then building the project will not re-use the (non-busy) documentation window for the build progress.
Closes#733
This is only done for code where running it twice would actually cause a problem.
Dispatch_once is favored over a static boolean only because it seems to carry slightly more semantic information.
Presently this will also disable it if the folder is opened via the Recent Projects chooser. Ideally opening via this list should not disable folder state restoring.
This means that if one does “mate «folder»”, open a few files as tabs, and then close the window, next time the same folder is opened, TextMate will restore the tabs.
Presently state is remembered (when closing a window) either if the file browser is visible or if more than one document is open in the window.
When opening a document it will be placed to the right of the current one (in the tab bar) even if the document being opened is already in the tab bar, this is to make ⌘W work to “close and go back” without having to keep a list of previously selected tabs.
This feature can now be disabled using:
defaults write com.macromates.TextMate.preview disableTabReordering -bool YES
Note though that if one selects multiple documents to open then it will potentially re-order the tab bar so that the documents selected are adjacent.
An option called "Auto-reveal open file in project browser" has been
added to the Projects preference pane. When checked, the currently open
file will be revealed in the project's file browser. By default, the
option is not checked and thus the behavior is as it was before.
This can be used to force a file to open in a new window, e.g.:
TM_PROJECT_UUID=$(uuidgen) mate README.md
Likewise, it can be used to force multiple invocations of mate to use the initially opened window (by re-using the UUID).
Closes#879
This would happen if last line was not newline terminated.
The fix does not take into consideration that last line might contain non-ASCII, in which case it should be highlighted.
Some valid UTF-8 byte sequences are not valid code points, so our “simple” validation is no guarantee that creating an NSString from the data will succeed.
These normally require that the sender is an NSIndexSet or has one as its represented object, but with this commit, they will also be usable when there is no index set available, and will then simply use the active tab.
This is to avoid cyclic dependencies since it was previously in a somewhat high-level framework, so everything that framework depended on, could not augment crash reports.