Sometimes shift is held down while TextMate is being launched for other reasons than to skip session restore, so to be safe, we are now asking the user to confirm their intent.
This was disabled in an attempt of avoiding the “do you want to open saved documents from last session?” which appear after a crash.
It doesn’t seem to have any effect though, so just noise in the code.
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.
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.
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.
Currently this is implemented in OakTextView which means that it doesn’t work for macros. Some refactoring is in order so that the implementation can be shared (lack of sharing has to do with how OakTextView reports status to Find dialog or via tool tips, and macros want none of that).
There is also no check to see if the current state of the editor is the result of a find operation, i.e. you can invoke “replace” regardless of wether or not “find” was the last action.
Finally, doing a multi-file search and using “find next” at the end of one document, which brings you to the first match of next document (part of the results), will not update “captures” from a potential regular expression search, meaning that if you then do “replace”, and your replacement string is a format string that references the match (via $1-n) then it will not be correctly expanded.
Closes#104.
This is work in progress but I don’t think any functionality is missing compared to previous commit, although some functionality might be less polished, e.g. the action buttons don’t properly enable/disable and the height of the results list gets lost when hiding it.
Some of the stuff that has changed / improved:
* The find/replace text fields adjust their height to encompass the content (closes#94). Presently though the initial height of the ontrols is one line regardless of content (but they should adjust on first edit).
* You can use Save All (⌥⌘S) to save affected files after Replace All (closes#558).
* The key equivalents / actions available in the Find dialog is now easier to find via the action pop-up, which also has enables accessibility.
* Using Next (⌘G) or Previous (⇧⌘G) with search results will move selection up/down.
* Using Find All with ‘in’ set to ‘Selection’ will find and select all matches in the current document, which fixes#425, though it might be more desirable to show the results in the find dialog (like Find All does for a document or folder).
When enabled the height of the document is increased by the height of the view port, which means the last lines of the document are not anchored to the bottom of the view port but can e.g. be centered.
Closes#513.
When a C++ exception is thrown from code invoked via a menu item then the menu item dispatcher will catch the exception and abort, this means the report doesn’t show the actual exception or contain any of the involved code.
By logging the key event in the report we should be able to deduce what action was invoked.
Adding info to diagnostic reports “documentation” from http://mjtsai.com/blog/2013/02/27/application-specific-crash-report-information/
Note that the documentation is a bit outdated as it hasn’t been touched since the first public alpha — updated documentation will appear when closer to final release, in the meantime interested parties should watch the release notes, wiki, and mailing list.
Closes#822.
It was calling super to keep our custom code to a minimum, but it turns out that the superclass will sometimes invoke bundle menu items even when items from the other menus are better candidates.
Partially reverts 4b0a9a08c7.
Before using the 'Open…' dialog caused the discreet graphics chip to be enabled until TextMate exited. Setting this flag tells the OS that we want and are able to use the integrated graphics to conserve the battery. Detailed in Apple Technical Q&A QA1734:
http://developer.apple.com/library/mac/#qa/qa1734/