Commit Graph

3571 Commits

Author SHA1 Message Date
Allan Odgaard
69bf44073d Change Find/HTML window collection behavior to work with 10.11
Previously we would set the window to “join all spaces” when TextMate was active, but on 10.11 it seems that the system will act like this is set even when TextMate “becomes activate”, so moving focus to TextMate, with an open Find/HTML window, will move the window to the active space, rather than move to the space containing TextMate.

Now we only set “join all spaces” when the user requests one of the windows, and the window is currently not already on the active space, and we unset this mode after bringing the window to front.

This commit effectively reverts a52fc3493b
v2.0-beta.8.2
2015-11-12 14:24:28 +07:00
Allan Odgaard
bdcba4d66e Change --amend option to --commit-button-title Amend
This allows us to set arbitrary titles, should we need it in the future.

It also changes the code slightly so that there is only one method to create the full button title.
2015-10-29 09:30:23 +07:00
Allan Odgaard
e1bbc9f358 Change --rebase-in-progress option to --show-continue-button
Also change the property accordingly.
2015-10-29 09:03:16 +07:00
Jacob Carlborg
d988cf18c2 Support "Amend" as button title in the commit window
When the --amend flag is passed to the "commit" command, the commit
window will used "Amend" instead of "Commit" as the title for the
commit button.
2015-10-29 08:54:06 +07:00
Jacob Carlborg
cc7e2e8322 Add support for commit and continue in the commit window
The use case for this feature is when an interactive rebase is in
progress and be able to, in one command, amend the current commit
and continue with rebase.

By default, if the --rebase-in-progress flag is passed when the
"commit" command is invoked the commit button will be in a
"commit and continue" state. This is indicated by the title of the
commit button now being "Commit & Continue". If the option (⌥) key
is being hold down the state will revert back to the standard "commit"
state and the title will change to "Continue".

If the butten was clicked when it was in the "commit and continue"
state the "commit" command will print "TM_SCM_COMMIT_CONTINUE=1"
(without the quotes) to stdout as the last line. If the button was
clicked when it was in the standard "commit" state the output may
contain "TM_SCM_COMMIT_CONTINUE=0", or the "TM_SCM_COMMIT_CONTINUE"
string will be absent.
2015-10-29 08:54:06 +07:00
Allan Odgaard
8d8c539313 Truncate environment variables that exceed ARG_MAX
Previously we only logged an error when this happened, but (recently?) exceeding the limit will cause execve().
2015-10-28 15:38:18 +07:00
Allan Odgaard
57d0f29cdc Replace in folder would lose byte-order-mark for UTF-8 documents
This would only happen for documents not already open when performing the search and replace (in folder).
2015-10-28 15:37:04 +07:00
Allan Odgaard
b55ef5b09a Save all xibs with Xcode 7.1 (7B91b)
This was done in an attempt to prevent the warning saying “This file is set to build for a version older than the project deployment target.”

Unfortunately saving all the xibs did not get rid of the warning, even though tehy are all set to have 10.7 as their build target.

The latest xib format does however remove about 10.000 lines of XML.
2015-10-26 23:26:17 +07:00
Allan Odgaard
3dbdd0cf32 Checkin release notes 2015-10-26 23:26:16 +07:00
Allan Odgaard
9490ff8967 Don’t re-use FSItems for expanded folders during reload
The problem is that the URL property for all descendents of this item are pointing to the old path.

Ideally we should recursively update the descendents, because the current workaround loses the expanded state of the folder.
2015-10-23 17:21:41 +07:00
Allan Odgaard
1cdf087e96 Reset target property when re-using file system item 2015-10-23 17:20:54 +07:00
Ronald Wampler
00a20aefb6 Revert "Disable unused-local-typedef warning for sparsehash"
This reverts commit 2c6ad9b391.

Upstream released a new version, which resolved the warnings this commit meant to suppress.
2015-10-22 16:27:40 +07:00
Allan Odgaard
c8fce64ad6 Account for NSOutlineView expand animations when revealing item
To reveal an item we need to expand all parents, but after switching to a view-based outline view, expanding items will be done animated, and updating the outline view’s bounds won’t happen until after all animation has completed.

I tried adding a completion handler to the current animation context, but this ran before the bounds had been updated.

I also tried to disable expansion animation (when we have an item to reveal), but I was unable to make that work. What I did was group the expandItem:expandChildren: call in a new animation context for which the duration had been set to zero.
2015-10-18 10:34:53 +07:00
Allan Odgaard
cb75d41db3 Prevent opening two tabs for the same file
This could previously be done by creating a symbolic link and then selecting both the symbolic link and the original file, and selecting to open both at once.

Since the two tabs would have same identifier, the NSView for one of the two tabs could be left behind in the tab bar when manipulating the tabs.
2015-10-17 17:42:19 +07:00
Allan Odgaard
1597e68714 Do not show ‘0’ when holding command (⌘) in search results
The numbers indicate the key equivalent that can be used to jump to the document, but since cb1c516 we no longer support ⌘0.
2015-10-16 20:02:24 +07:00
Allan Odgaard
7719097bdd Add View → Font → Default Size menu action
This also works for the HTML output.
2015-10-16 19:53:16 +07:00
Allan Odgaard
e621685fc1 Add makeTextStandardSize: action method 2015-10-16 19:53:16 +07:00
Allan Odgaard
cb1c51692c Bind Go to Tab → Last Tab to ⌘9 instead of ⌘0
Also avoid binding to ⌘0 in all other ⌘1-n contexts.

This frees up ⌘0 to “Reset Font Size”.
2015-10-16 19:52:47 +07:00
Allan Odgaard
9a1e05f489 Showing bundle menu with no status bar would cause infinite loop
This is because we were forwarding the message to ‘nil’ rather than the status bar, and ‘nil’ here would be first responder, i.e. ourself.

Fixes textmate/bugs#17
2015-10-16 19:14:36 +07:00
Michael Sheets
b06f20ca72 Add project scope for Cargo (Rust) projects (attr.project.cargo) 2015-10-10 19:30:22 -05:00
Allan Odgaard
720f9eac98 Expect more than just {?name} in GitHub’s URI template
Currently GitHub supports both name and label parameters.
2015-10-03 17:33:21 +07:00
Allan Odgaard
26d4ebf302 Decompile .scpt files when generating QuickLook preview/thumbnail 2015-10-03 17:33:21 +07:00
Allan Odgaard
5738792b36 Refactor QuickLook generator
Generating a preview and a thumbnail now share the same code for loading the file and creating an attributed string from its content.
2015-10-03 17:33:21 +07:00
Ronald Wampler
054747974b Refresh when unfolding on mouse down event
This seems to be necessary when the document occupies less space than the visible document window.
2015-10-03 17:33:21 +07:00
Ronald Wampler
a23b5225b1 Don't undefine/redefine "DEPRECATED" macro
We no longer use Apple's headers for `openssl` so this isn't necessary.
2015-10-03 17:33:21 +07:00
Ronald Wampler
5bbcf42487 Require LibreSSL instead of relying on the system provided openssl
Apple deprecated `openssl` in 10.7 and the headers are now removed in 10.11. Since we use some low level functions that are not provided in Apple's crypto frameworks, we now require are own version.
2015-10-03 17:33:21 +07:00
Ram Nadella
acd4497f5e Fix typo in 2015-09-16 (v2.0-beta.8) section of release notes 2015-10-03 17:10:47 +07:00
Allan Odgaard
cd016be294 Update dialog plug-in (declare new protocols from 10.11 SDK) 2015-09-24 18:33:40 +07:00
Ronald Wampler
3f5575cfe4 Directly convert the URL received from NSOpenPanel to a path
We call `fileURL` here but the method doesn't actually exists (it's actually a property with the getter `isFileURL`). The URLs we obtain from NSOpenPanel are paths so it's probably safe to get the path without checking if it's a proper file URL.
2015-09-21 09:50:49 -04:00
Ronald Wampler
75d3c74f05 OFBOutlineView: Rename draggedItems → draggedOFBItems
This property's name was conflicting with a private instance variable in our superclass (NSOutlineView) for the 10.11 SDK.
2015-09-21 09:50:49 -04:00
Ronald Wampler
f29ddf6500 Declare new protocols when building for 10.11
These were informal protocols prior to 10.11.
2015-09-21 09:50:20 -04:00
Ronald Wampler
9e4e88ce76 Explicitly cast back to the CGEventFlags typedef
The SDK for 10.11 (Xcode 7 GM and Xcode 7.1 beta) declares this enum using CF_ENUM instead of CF_OPTIONS, which forces us to explicitly cast back to the typedef type. <rdar://22743357>

Hopefully, we can revert this after OS 10.11 is officially released.
2015-09-21 09:50:04 -04:00
Allan Odgaard
64b03394e9 Checkin release notes v2.0-beta.8 2015-09-16 08:35:15 +02:00
Allan Odgaard
10b1f3bfea Always clear SCM info when changing document
For a project window where only some tabs are under version control, switching from one tab with version control info, to one without, would use the info from the previous tab with the new one (proxy icon badge and scope attributes).
2015-09-10 14:24:28 +02:00
Allan Odgaard
b6a7529d97 Bind tab size dialog to OakDocumentView instead of OakTextView
This ensures the setting is saved and also (sort of) follows the principle of least knowledge.
2015-09-10 14:20:51 +02:00
Allan Odgaard
871e013ed9 Add tabSize property to OakDocumentView
Going via this property ensures that the setting is saved.
2015-09-10 14:19:10 +02:00
Allan Odgaard
b1fa6524cb Save with Xcode Version 6.4 (6E35b) 2015-09-10 13:06:36 +02:00
Allan Odgaard
a99acf8532 fixup! Ensure we re-use file browser items that are unchanged v2.0-beta.7.12 2015-09-07 20:15:10 +02:00
Allan Odgaard
98571f90ee Update Onigmo submodule v2.0-beta.7.11 2015-09-07 18:27:16 +02:00
Allan Odgaard
c038bbe7bc Ensure we re-use file browser items that are unchanged
The data sources should already re-use items, as they are passed the old items, but since data sources are multi threaded, there might perhaps be a situation where the items passed gets updated out-of-order and re-use isn’t perfect (I haven’t been able to confirm this).

Re-using the items, when we use the animation methods of the outline view, does however seem to be very important, because the outline view will neither copy nor retain the items returned from our data source, so we must ensure they stay retained until we have told the outline view that the item no longer exist, so replacing an item with one that is equal but not pointer identical, without notifying the outline view, will cause random crashes.

At least that is my theory.
2015-09-07 18:16:58 +02:00
Allan Odgaard
7e396fae6f Open all selected items on double click and Open menu action 2015-09-07 18:16:58 +02:00
Allan Odgaard
51edc48bea Checkin release notes 2015-09-07 18:16:58 +02:00
Allan Odgaard
4484eb0de3 Remove unused method 2015-08-30 10:55:18 +02:00
Allan Odgaard
975fd70779 Re-encode redundantly encoded multi-byte sequences
If our buffer contained such sequences then an exception could be thrown when creating an NSString representation, for example copying to the system clipboard or displaying search results in the UI.
2015-08-30 10:53:24 +02:00
Allan Odgaard
09294626fe Use stringWithCxxString: instead of calling c_str
The problem with the latter is that a C string is null terminated, but we might have null characters in our string.

Furthermore, the stringWithCxxString: can do a little extra work, like check if the string is NULL_STR or (after next commit) fix redundantly encoded multi-byte sequences.
2015-08-30 10:52:56 +02:00
Allan Odgaard
7400fb63ad fixup! Use empty last line from commands working on multiple selections
We only use the last empty line when there are more than a single line break in the string to be inserted.

The use-case here is having multiple carets and then running a command like “echo foo”. Here we receive “foo\n” which is split into (“foo”, “”), so every second caret would get the empty string inserted.
2015-08-27 23:02:17 +02:00
Allan Odgaard
c603b83050 Don’t use “entire document” fallback input with multiple carets 2015-08-27 22:58:56 +02:00
Allan Odgaard
d02421670f Don’t skip sanitizing ranges when input is “entire document”
Incase there are multiple carets, we’ll get multiple “entire documents” ranges.
2015-08-27 22:55:03 +02:00
Allan Odgaard
f06f447ede Avoid referencing private types by using std::remove_pointer 2015-08-27 22:46:53 +02:00
Ronald Wampler
2c6ad9b391 Disable unused-local-typedef warning for sparsehash
Also, disable unknown-pragmas warning for older version of clang.
2015-08-11 21:01:07 +02:00