Commit Graph

2494 Commits

Author SHA1 Message Date
Allan Odgaard
fb80ffd272 Use custom test system for testing the ‘file’ framework 2014-04-08 15:43:20 +07:00
Allan Odgaard
10d94644f7 Switch oak::server_t implementation from pthread → libdispatch
This makes the abstraction redundant and it should be removed. I am doing that as a multi-step process, since the previous implementation was blocking tests from being updated to the new (dispatch queue based) test system.
2014-04-08 15:43:20 +07:00
Allan Odgaard
e974582baa Allow specifying run-loop mode for document_t::sync_open 2014-04-08 15:43:20 +07:00
Allan Odgaard
7bb584c604 Add assertion about being called in the main dispatch queue 2014-04-08 15:43:19 +07:00
Allan Odgaard
b0864281ed Add “New Document” as output option for Filter Through Command 2014-04-08 15:43:19 +07:00
Allan Odgaard
184782a6ee Crash report info no longer eclipse info from higher up the stack 2014-04-08 15:43:18 +07:00
Allan Odgaard
3642ee2750 Save All from find window uses default run-loop mode for saving
When saving and the document needs to execute a command (e.g. callback.document.export) then we can no longer use our special run-loop mode, as command execution is now using queues, and queue dispatching is paused when running in a custom run-loop mode.
2014-04-07 17:29:49 +07:00
Allan Odgaard
6cc0108961 Rename document_t:{open,save} → document_t:sync_{open,save}
This makes it easier to search for code that use these functions.
2014-04-07 17:28:41 +07:00
Allan Odgaard
96de950ed1 Return initializer list instead of using std::make_pair (C++11) 2014-04-06 19:36:09 +07:00
Allan Odgaard
c7a211b2fd Let View → Wrap Column remember the last 5 values used 2014-04-06 19:36:09 +07:00
Allan Odgaard
75dc734a87 When tar fails, it does not remove the output file 2014-04-06 19:36:08 +07:00
Allan Odgaard
30b4d9322d Checkin release notes 2014-04-06 19:36:08 +07:00
Allan Odgaard
f05f77909e No need to sanitize UTF-8 data in editor_t::paste
We now have the clipboard_t::entry_t ensure that the data is UTF-8.
2014-04-05 14:13:40 +07:00
Allan Odgaard
2b2a20b9b7 Ensure clipboard data is UTF-8 2014-04-05 14:13:40 +07:00
Allan Odgaard
7b182c428b Disable buffer completion when there is no prefix/suffix
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).
2014-04-05 14:13:40 +07:00
Allan Odgaard
6b24c1b11f Missing broadcast when changing “on disk” in document_t::set_path
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).
2014-04-05 14:13:40 +07:00
Allan Odgaard
6185cc17ab Do not inherit numbered variables for potential regexp captures
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).
2014-04-05 14:13:39 +07:00
Allan Odgaard
59988ecdaf Add tests for command requirements 2014-04-05 14:13:39 +07:00
Allan Odgaard
c9a16a6033 Support requirements where existing variable has a space
For example setting TM_NINJA to “/usr/local/ninja -j6” will use the variable as-is if “/usr/local/ninja” is an executable.
2014-04-05 14:13:39 +07:00
Allan Odgaard
575c31b66f Fix error message for command requirements with no variable 2014-04-05 14:13:39 +07:00
Allan Odgaard
7d0100fa2b utf16::distance: End iterator may point into multi-byte character
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).
2014-04-05 14:13:39 +07:00
Allan Odgaard
de1c6aa5a9 Add commit message to history even if user cancels the dialog
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.
2014-04-05 14:13:39 +07:00
Allan Odgaard
172d2d41c9 Ensure the com.macromates.visibleIndex attribute value is valid
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).
2014-04-05 14:13:39 +07:00
Boris Dušek
44a803fe7c Use NSAccessibilityUnignoredDescendant to streamline code 2014-04-05 14:13:38 +07:00
Boris Dušek
3e2df29076 Add '+initialize' guard
Per https://www.mikeash.com/pyblog/friday-qa-2009-05-22-objective-c-class-loading-and-initialization.html
2014-04-05 09:46:42 +07:00
Boris Dušek
07e253f3bb Cleaner disabling of image view accessibility. 2014-04-05 09:46:42 +07:00
Ronald Wampler
16330d039e Show last commit message in the Previous Commit Messages menu
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.
2014-04-03 23:43:10 -04:00
Ronald Wampler
32ef9c8d67 Set display name when sending diff to TextMate
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.
2014-04-03 23:20:03 -04:00
Ronald Wampler
0ce77e8de7 We use camelCase for local variables 2014-04-03 23:20:02 -04:00
Allan Odgaard
9018e8b1aa Rework command execution (diff, revert, etc.)
I wanted to get rid of calling /usr/bin/which but ended up also modifying the methods that used the absolutePathForPath: method.
2014-04-03 15:51:47 +07:00
Ronald Wampler
201f247b2f New (native) commit window
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).
2014-04-03 15:51:05 +07:00
Allan Odgaard
645c837262 Skeleton commit window server
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”).
2014-04-03 15:49:58 +07:00
Ronald Wampler
960b41297b Export TM_SCM_NAME and TM_SCM_BRANCH
This will be used by OakCommitWindow.

Also removed extraneous whitespaces.
2014-04-03 15:44:39 +07:00
Allan Odgaard
e4c9008422 Don’t assume only one class implements performBundleItem: 2014-04-03 15:08:37 +07:00
Allan Odgaard
d4882de422 When updating bundles we rename old bundle before delete
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.
2014-04-03 14:51:40 +07:00
duanemoody
073e97ffd7 Add application category for OS X
Applications is often not subfoldered and View --> Arrange by Application Category helps but apps need to have this metadata otherwise they're sorted into "Other" at the bottom.  https://developer.apple.com/library/Mac/releasenotes/General/SubmittingToMacAppStore/#//apple_ref/doc/uid/TP40010572-CH16-SW8  (this applies to all Mac apps, not just those coming from App Store)
2014-04-02 14:29:59 -07:00
Allan Odgaard
b6b75227b3 Exception handler was overwriting crash report info 2014-04-02 14:02:28 +07:00
Allan Odgaard
f93f793bc5 Keep dispatch group around as we may call wait after process exit 2014-04-02 14:02:28 +07:00
Allan Odgaard
a735a37b9b We shouldn’t (potentially) call fprintf() after vfork()
Since it was only incase of failing to close a file descriptor, it shouldn’t have played any role in practice.
2014-04-02 12:36:07 +07:00
Allan Odgaard
b1de8256a2 Disable WebView plug-ins and page cache for about window 2014-04-01 16:01:19 +07:00
Allan Odgaard
e86f40255c Update HTML tool tips (font and WebView cache/plug-in settings) 2014-04-01 16:01:19 +07:00
Allan Odgaard
cccfd855ac Sanitize output from TextMate.system()
Since the API specifies an NSString we must expect valid UTF-8.
2014-04-01 16:01:19 +07:00
Allan Odgaard
184c5fecb0 Don’t use -KU with ruby as it logs a warning with ruby 2.0 2014-04-01 16:01:19 +07:00
Allan Odgaard
0daa6d0ec2 Tighter code for removing malformed UTF-8 sequences 2014-04-01 16:01:19 +07:00
Allan Odgaard
cf452cdcee Increase the number of tests for sanitizing UTF-8
Also harmonize the formatting of the existing tests.
2014-04-01 16:01:19 +07:00
Allan Odgaard
471fbe45c2 Do not stack allocate potentially large buffer
Also test that each system function used actually succeeds.
2014-04-01 16:01:19 +07:00
Allan Odgaard
25b3a5f4a4 Notify VoiceOver user of find window status bar changes
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.
2014-04-01 14:36:04 +07:00
Allan Odgaard
5f94f460ee Post find feedback accessibility announcements 2014-04-01 14:23:31 +07:00
Boris Dušek
c3088da9a5 Add my work email as contributor address 2014-04-01 14:03:29 +07:00
Boris Dušek
3c853dfa5e Use UI creation functions for accessibility in status bar 2014-04-01 14:03:29 +07:00