Commit Graph

240 Commits

Author SHA1 Message Date
Allan Odgaard
cabd099830 Checkin release notes 2013-03-17 16:46:43 +01:00
Allan Odgaard
3a75199e9d Use menu validation to update bundle menu item titles
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.
2013-03-16 17:49:48 +01:00
Allan Odgaard
976dab5065 Only show bundle updates for this and last year
This makes the list appear noticeable faster. The dates are presently hardcoded to 2012 and 2013.
2013-03-16 17:49:48 +01:00
Allan Odgaard
38992fadef Simplify NSMenu subclass
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.
2013-03-14 10:14:46 +01:00
Allan Odgaard
17ef6ef5d0 Use path::is_absolute instead of custom code 2013-03-14 10:14:45 +01:00
Allan Odgaard
7a00c45448 Checkin release notes 2013-03-13 14:17:05 +01:00
Allan Odgaard
0075b46c82 Introduce zeroIndentPattern
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.
2013-03-13 12:38:12 +01:00
Allan Odgaard
d16f3bcc1e Use per-line indent patterns when estimating indent
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 closes textmate/c.tmbundle#3 and also closes textmate/php.tmbundle#24.
2013-03-13 12:38:12 +01:00
Allan Odgaard
77a07aedc7 Let TM_MATE point to ‘mate’
This command is used by a lot of commands, so it makes sense to have a dedicated variable for its location.
2013-03-13 12:38:12 +01:00
Allan Odgaard
db5df4a58c Update Find window API 2013-03-13 12:37:22 +01:00
Allan Odgaard
4b5db02a44 Remove Find in Selection menu item
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.
2013-03-13 12:37:22 +01:00
Allan Odgaard
f0efe600e4 Remove Edit → Select → None
This can now instead be found in the file browser’s action menu, as it (by design) only works on the file browser, not the text view.

Closes #883.
2013-03-12 10:25:04 +01:00
Allan Odgaard
fcbaacdfe9 Set default encoding to UTF-8
Although everything would still default to UTF-8, the initial title of the pop-up in Preferences would show a wrong value.

Fixes #889.
2013-03-11 22:18:18 +01:00
Allan Odgaard
13edc6d131 Use O_CLOEXEC when opening files
This avoids leaking file descriptors into child processes, which would otherwise happen if another thread forks while the file descriptor is open.
2013-03-10 16:07:10 +01:00
Michael Sheets
1cd3f313d7 Remove lesser used icons to save space in download 2013-03-08 13:27:54 +01:00
Allan Odgaard
ff0cd7013e Remove outdated comment 2013-03-07 23:13:48 +01:00
Allan Odgaard
582b101b34 Checkin release notes 2013-03-07 22:13:17 +01:00
Allan Odgaard
baade85a7c Remove Edit → Find → Full Words menu item
This option isn’t implemented so better not confuse users by having it in the menu.
2013-03-07 20:23:22 +01:00
Allan Odgaard
d89321c4ba Checkin release notes 2013-03-07 16:31:07 +01:00
Allan Odgaard
14cfedb287 Implement Replace [and Find] bound to ⌥⌘G
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.
2013-03-07 16:21:57 +01:00
Allan Odgaard
4a24d0ad58 Rework find dialog (part one)
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).
2013-03-07 10:50:19 +01:00
Allan Odgaard
840f0922c7 Assign ⌃⌘↩ to View → Enter / Exit Full Screen
Closes issue #860.
2013-03-05 16:13:45 +01:00
Allan Odgaard
32d87857b9 Checkin release notes 2013-03-04 10:58:18 +01:00
Steven Clukey
7892eac2d4 Add “scroll past end” option to the View menu
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.
2013-03-03 15:14:29 +01:00
Allan Odgaard
6042bc86d6 Log current key event in diagnostic reports
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/
2013-03-01 16:41:01 +01:00
Allan Odgaard
f58a92885d Add titles to all help pages
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.
2013-02-25 21:07:53 +01:00
Allan Odgaard
b234f19fb4 Checkin release notes 2013-02-25 15:35:55 +01:00
Allan Odgaard
bd5b105a44 Only set -fobjc-link-runtime for app targets
Ideally this should be set for executable targets that use Objective-C (and have deployment target set to 10.7).

This change is a quick fix for not having pure C++ tests leak. For more info see https://github.com/sorbits/rdar/blob/master/LeakWith10_7ObjCRunTime/README.md
2013-02-25 15:28:37 +01:00
Allan Odgaard
6d6c3e4de6 Use path::is_absolute instead of custom code 2013-02-25 15:25:17 +01:00
Allan Odgaard
a6e99c1853 Don’t call super in main menu key equivalent handler
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.
2013-02-23 11:24:56 +01:00
Michael Sheets
a05b1dca2e Use integrated graphics on laptops
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/
2013-02-22 18:14:00 -06:00
Allan Odgaard
facfe2d6f2 Checkin release notes 2013-02-22 18:23:10 +01:00
Allan Odgaard
39d568e146 Rework items and key equivalents in File menu
Adding New File / Folder and Close All Tabs to the menu.
2013-02-21 22:38:06 +01:00
Allan Odgaard
cbb0a7864d Drop ‘ng’ namespace for scm 2013-02-21 17:39:55 +01:00
Allan Odgaard
4d32aa7d9f Checkin release notes 2013-02-18 16:18:16 +01:00
Allan Odgaard
63beedc6f4 Handle ⌥⌘⇠ / ⌥⌘⇢ in main menu subclass
This means they work (as alternatives for ⌘[ / ⌘]) in all windows with tabs.

We now also trigger menu-flashing for when pressing the keys.
2013-02-18 15:38:26 +01:00
Allan Odgaard
c0afcb9e03 Checkin release notes 2013-02-16 10:44:45 +01:00
Allan Odgaard
e792c31698 Checkin release notes 2013-02-15 23:13:16 +01:00
Allan Odgaard
402e1f79b1 Use one bundle menu delegate for all menus
This avoids the problem of keeping the delegate retained while the menu is up (the menu item exists).
2013-02-12 20:11:50 +01:00
Allan Odgaard
26fe4a95e9 Add Edit → Select → None (⇧⌘A)
This can be used to deselect all in the file browser.

Closes #779.
2013-02-11 22:05:44 +01:00
Allan Odgaard
0a0d9a3d9b Assign key equivalents to Go → Back/Forward
We use ⌘[ and ⌘] which is also used for Text → Shift Left/Right so we only set these keys for when the main text view is not active.

The main advantage is that you can now use these keys to move back and forth in history of HTML views (it also works in file browser, but due to a custom keyDown: overload, it also worked prior to this commit).
2013-02-11 21:58:29 +01:00
Allan Odgaard
cbd6d8eebe Checkin release notes 2013-02-11 15:18:35 +01:00
Allan Odgaard
e71fd192c5 Let SIGUSR1 relaunch TextMate
This is mainly to allow a way to test the relaunch code, as it is otherwise only used for s/w updating and installing plug-ins.
2013-02-11 14:21:22 +01:00
Allan Odgaard
ad03811df0 Ensure session restore when relaunching
The user can manually disable session restore, which is undesired when relaunching due to a software update or installing a plug-in, so we now override the user’s choice for the new instance launched.
2013-02-11 14:21:22 +01:00
Allan Odgaard
abf13e913a Show notification when posting crash reports (10.8)
This is both to remind the user that crash reports are automatically submitted and to make it easy for them to point us to a specific crash, as notification center will now work as a list of recent crashes; click on one of them to see the online version.
2013-02-08 11:20:36 +01:00
Allan Odgaard
b139ac5097 Change push_back → emplace_back (C++11)
This is mainly motivated by readability, so I only did a few select replacements.
2013-02-08 11:20:35 +01:00
Allan Odgaard
e75e7ec8e5 Change text::format → std::to_string (C++11) 2013-02-08 11:20:34 +01:00
Allan Odgaard
75adb03039 Checkin release notes 2013-02-06 16:48:18 +01:00
Allan Odgaard
c351b89324 Checkin release notes 2013-02-05 21:06:15 +01:00
Allan Odgaard
3ec573931d Checkin release notes 2013-02-05 09:02:04 +01:00