Commit Graph

258 Commits

Author SHA1 Message Date
Allan Odgaard
a18008260a Checkin release notes 2013-04-10 18:25:50 +07:00
Allan Odgaard
d45adf2fed Ask for confirmation to skip session restore
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.
2013-04-10 10:13:01 +07:00
Allan Odgaard
6a9448afc0 Checkin release notes 2013-03-27 17:26:36 +01:00
Allan Odgaard
a9d492ab58 Add Edit → Macros → Save Macro… (⌃⌘M) 2013-03-27 14:32:26 +01:00
Allan Odgaard
fe487c1a66 Fix typo in release notes 2013-03-26 16:49:50 +01:00
Allan Odgaard
f689aac0db Checkin release notes 2013-03-26 16:41:54 +01:00
Allan Odgaard
bffa2eef10 Move bundle installing to BundlesManager 2013-03-26 16:00:53 +01:00
Allan Odgaard
099f7c60ea Improve bundles index code
By making it part of the BundlesManager singleton we can work with the event loop to coalesce reloads and delay saving the index.
2013-03-25 22:56:49 +01:00
Allan Odgaard
d1a6c854a1 Add API to control bundle auto-updating 2013-03-25 13:04:40 +01:00
Allan Odgaard
37590bd3fd Switch to new bundle loading code 2013-03-25 12:48:39 +01:00
Allan Odgaard
f7ad857385 Show current selection string in Go to Line dialog 2013-03-25 10:25:59 +01:00
Allan Odgaard
4fcf2a9d5a Checkin release notes 2013-03-21 23:33:09 +01:00
Allan Odgaard
d021d97b43 WIP: Filter through command 2013-03-21 14:39:48 +01:00
Allan Odgaard
d0db9d9554 Checkin release notes 2013-03-20 11:33:15 +01:00
Allan Odgaard
2c85ef9ac2 Move crash reporter info to utility.h 2013-03-20 11:30:40 +01:00
Allan Odgaard
74f22623e9 Don’t disable NSQuitAlwaysKeepsWindows
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.
2013-03-19 15:51:08 +01:00
Allan Odgaard
769831f629 Use Objective-C literals 2013-03-19 15:49:18 +01:00
Allan Odgaard
dad6c4e629 Checkin release notes 2013-03-18 14:38:32 +01:00
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