We still enable it when a custom completion command provides us with completion candidates. For example user might hit escape in a context where a file name should be inserted, without providing any initial prefix or suffix (as the number of expected candidates is small).
This resulted in missing proxy icon update e.g. when saving an untitled document over an existing one, as we would first set the path to the new location (and indirectly change the “is on disk” status without sending the proper notification).
If the format string itself does a replacement with potential captures $1-$n then we ensure that $1-$n are not inherited from the environment (which could be a parent regexp match).
This function is (indirectly) used by a lot of code, and not all of it provide with valid indexes, though it seems like an issue that can be fixed locally, hence why I have decided to allow it (coupled with this being the main reason for crashes).
It is however still not allowed when building in debug mode (rationale being that running it in debug mode and getting an assertion failure should provide enough info to fix the issue).
The rationale is that while the user is writing a commit message they might be reminded of something that should be fixed before committing, so they’ll cancel but wish to come back to the partially written message later.
Also skip checking for saved selection / visible index if there is no text in the buffer (since in this case, teh only valid values for seleciton / visible index are the default values).
This was previously set to a pop-up menu, hence the need for a placeholder item to set the menu title. However, for pull-down menus, the first item is used as the title and remains fixed.
This difference in behavior caused the last used commit message (first item) not to be listed in the menu.
We set the name as:
'---/+++ file'
I wanted the display name to suggest a diff without calling it something directly as "file (diff)", so I thought '---/+++' would be a nice and condense way of indicating that.
This is based on the previous commit window code base. It replaces the NSTextView with a OakTextView for entering the commit messages. This allows us to take advantage of some of the git grammar features, e.g., fixup!.
If other SCM bundles are updated in the future to include any specific grammars, these can be used in the commit window by setting the bundle grammar to "text.SCM-commit", where SCM could be hg or svn for example.
Changes to note:
* The Modify row button for the "--action-cmd" commands are now implemented in the action menu and the table context menu.
* The shortcut for committing is ⌘↩ (but fn-return seems to (still) work).
This allows the commit command line tool to open a window as “native”.
We use distributed objects for talking to TextMate and getting a response. For the response, we release the connection in the next iteration of the event loop and then gracefully exit the program. Though it’s not clear if this is enough time for distributed objects to reply the client (if not, an exception is thrown in the client about “connection disappeared while waiting for a reply”).
This means if TextMate is terminated during update, worst-case is that the bundle is gone (which we can detect) rather than potentially leaving a partially deleted bundle on disk.
Also, since we now move in the updated version immediately after removing the old, the time where the disk is in a bad state (compared to our bundle index) has been minimized.
We don’t have a specific element associated with the result being announced so we use the current responder (unless it has accessibility ignored, in which case we do not post any notification).
Using the current responder is not ideal, but I do not know how we can either associate the notification with the find panel or post it as a global notification.
This function makes it easy to set accessibility "labels" for UI elements.
It is flexible - takes care of NSView vs. NSControl case, labels can be
specified directly as a string or as a user interface element.
The standard doesn’t care which side the keyword is placed on, but placing it on the right makes it easier to read types.
E.g. reading “int const* const” from right to left we get “const pointer to const integer”.