Commit Graph

4493 Commits

Author SHA1 Message Date
Allan Odgaard
628a8e409b Add syntax highlight to pasteboard search history
This is just a quick proof-of-concept.
v2.0-beta.12.24
2016-10-12 10:43:42 +02:00
Allan Odgaard
1a499ed55d Remove document_t and related tests
Tests should be ported to OakDocument.
2016-10-12 10:43:42 +02:00
Allan Odgaard
9053491789 Revert "Use thread_local instead of our own implementation"
This reverts commit 1658d6356a.
2016-10-12 10:43:42 +02:00
Allan Odgaard
b3c64db20f Enable preliminary C++17 support (C++1z)
Not using any new C++17 (draft) features, but we may want to use std::variant as soon as it becomes available (as we currently use boost::variant), although std::variant will be a library feature.
2016-10-12 10:43:42 +02:00
Allan Odgaard
dde19a2725 Explicit constructor required after updating boost 2016-10-12 10:43:42 +02:00
Allan Odgaard
c4370ee029 Create destination’s parent folder when moving Bundles 2016-10-12 10:43:42 +02:00
Allan Odgaard
e3364c3b11 Add another LEGACY marker 2016-10-12 10:43:42 +02:00
Allan Odgaard
ecc13b46c2 Checkin release notes for 2.0-beta.12.23 2016-10-11 13:15:48 +02:00
Allan Odgaard
3dc185cb67 Do not wrap executeBundleCommand:variables: in auto refresh 2016-10-11 13:02:36 +02:00
Allan Odgaard
a278bfd5fe Postpone loading document changes when processing user edit event
When running bundle commands we run a local event loop which means that we can receive events such as “document changed” while still waiting for the bundle command to finish.
2016-10-11 13:02:36 +02:00
Allan Odgaard
dfad1a61ce Add undo_manager_t::in_undo_group API 2016-10-11 13:02:36 +02:00
Allan Odgaard
66410365d1 Remove volume::settings API 2016-10-11 10:36:49 +02:00
Allan Odgaard
97e9b8fd1d Migrate legacy volumeSettings to Global.tmProperties 2016-10-11 10:36:49 +02:00
Allan Odgaard
377d84ec94 Add another LEGACY marker 2016-10-11 10:36:49 +02:00
Allan Odgaard
7be3703404 Change user defaults to .tm_properties for disabling extended attributes 2016-10-11 10:36:49 +02:00
Ronald Wampler
ec9bd3a002 Opt out of automatic window tabbing (10.12) 2016-10-10 22:46:15 +02:00
Allan Odgaard
5af64db166 Ask user to move Avian bundles into TextMate’s application support 2016-10-10 22:39:44 +02:00
Allan Odgaard
3a8f524803 Read and install bundles in TextMate folder (instead of Avian) 2016-10-10 22:39:44 +02:00
Allan Odgaard
8e0b22507a Use LEGACY marker for code that should eventually be retired
This is to make it easier to search for such code.
2016-10-10 22:39:16 +02:00
Allan Odgaard
f66d48d4d5 Limit input to CFCharacterSetIsLongCharacterMember
This is an optimization but it also fixes a crash when CFCharacterSetIsLongCharacterMember is called with extremely large values.

One crash report shows the input being 0x1001DEBC, which is not valid UTF-32, could perhaps be the result of loading a garbage file, so it might make sense to perform some range checks when the user selects to load a file using a UTF encoding.

It could also be command output or possibly copy/paste.
2016-10-10 22:38:06 +02:00
Allan Odgaard
dc1406e32e Use AND/OR/NOT with NSPredicate instead of the C equivalents
The BNF for NSCompoundPredicate only lists the former keywords, not the C syntax (not that it has caused any problems to use it).
2016-10-10 22:38:05 +02:00
Allan Odgaard
dfe30c5328 Prune pasteboard history before saving 2016-10-10 22:38:01 +02:00
Allan Odgaard
ff4ad90ac7 Add pruneHistory: method to OakPasteboard 2016-10-10 22:38:00 +02:00
Allan Odgaard
5c1014c578 Add user defaults keys for how much pasteboard history to keep 2016-10-10 22:38:00 +02:00
Allan Odgaard
1a79e15017 Improve Objective-C type info (generics) 2016-10-10 22:38:00 +02:00
Allan Odgaard
4f9446ae30 Preserve a document’s visible index when updating its selection
Both the selection and visibleIndex property should be reworked, as it’s not really document properties.
2016-10-10 22:38:00 +02:00
Allan Odgaard
6b93c00371 Tweak how we create the output pop-up menu for Filter Through Command… 2016-10-10 22:38:00 +02:00
Allan Odgaard
a57e4dde1c Minor improvement in pasteboard history’s Clear All 2016-10-10 22:37:53 +02:00
Allan Odgaard
d2a078fd32 Improve handling of delayed pasteboard history saving
Previously we would save 60 seconds after a change, but successive changes would not bump the timer, and we had a timer per pasteboard, so changing both the find and replace pasteboard would schedule two save operations, even though they share context.

Now we save 30 seconds after any of the pasteboards were last changed.
2016-10-10 22:37:25 +02:00
Allan Odgaard
03d912e7c4 Bump date of find/replace pasteboard history items when they are used
Currently this bumping is limited to the Find dialog and happens when executing a search. Selecting from the Show Find History or subsequently using ⌘G, does not bump the date of the selected item (but probably should).
2016-10-10 22:37:12 +02:00
Allan Odgaard
2feb4a497a Use crash_reporter_info_t’s convenience constructor
Also change most ‘crashInfo’ variable names to just ‘info’ to be consistent.
2016-10-07 22:14:33 +02:00
Allan Odgaard
4e3d40481f Add convenience constructor to crash_reporter_info_t 2016-10-07 22:14:33 +02:00
Allan Odgaard
37b417f769 Add diagnostics to track down KVO issue
I see the following exception from macOS 10.12 users: Cannot update for observer <DocumentWindowController 0xhhh…> for the key path "selectedDocument.documentEdited" from <DocumentWindowController 0xhhh…>, most likely because the value for the key "selectedDocument" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the DocumentWindowController class.
2016-10-07 22:14:33 +02:00
Allan Odgaard
1d7c168cb8 Rework logic for when search result selection should select in document
There are two issues here, one is that double-clicking a result sends both “selection did change”, “did single click” and “did double click” messages, which all should potentially select the result in the document, but this does introduce a bit of overhead, although I think this is insignificant.

The other issue is that a “single click” or “selection did change” shouldn’t select in the document when the user is selecting multiple items, which is useful for the various Copy actions.
2016-10-07 10:02:58 +02:00
Allan Odgaard
daa0b801e9 Abort drag scroll timer if left mouse is no longer down
Based on diagnostic reports it would appear that the drag scroll timer can outlive the document. The timer is currently stopped on mouseUp: but this is probably not an event we should assume is always sent, for example if the application is made inactive while the mouse button is down, we may never see it being released.
2016-10-07 10:02:58 +02:00
Allan Odgaard
6a61853183 Setting a document’s selection now resets its “visible index”
When a document has a visible index then we scroll to this index, on bringing the document to front. This is not desired when we set the selection, since we basically do that to “scroll to this location”.
2016-10-07 10:02:58 +02:00
Allan Odgaard
bf747370a8 The “first line” sniffing done when changing path now work on first 2 kb
We do have a few patterns that match multiple lines, e.g. the XML plist.

The problem would happen if a document was opened using a multi-line “first line” match, but another grammar matched its extension. If this document changed location (same extension), it would switch to use the grammar that matched its extension.
2016-10-07 10:02:58 +02:00
Allan Odgaard
7f3055e89d Don’t let scoped global settings eclipse scoped default settings
We can have a default setting to ‘source.ruby’ and a global setting of ‘source’, previously the latter would eclipse the former.
2016-10-07 10:02:58 +02:00
Allan Odgaard
3ec7b05473 Do not include user’s email in crash reports
Inconveniencing all users with the “TextMate wants to access your contacts” dialog is not worth having the ability to contact users about their crash reports.
2016-10-07 10:02:58 +02:00
Allan Odgaard
8ba7535010 Checkin release notes for 2.0-beta.12.21 2016-10-06 21:43:59 +02:00
Allan Odgaard
1fa5bc7fae Implement command auto refresh for document change, save, and close 2016-10-03 22:05:39 +02:00
Allan Odgaard
0556886d99 Add class to manage “command refresh” 2016-10-03 22:05:39 +02:00
Allan Odgaard
6245fa17d5 Introduce ‘reusable’ property to OakHTMLOutputView
This defaults to YES but can be set to NO if an output view should not be re-used (even though no command is currently running).
2016-10-03 22:05:39 +02:00
Allan Odgaard
7255692cbf Do not mirror needsNewWebView in window controller 2016-10-03 22:05:39 +02:00
Allan Odgaard
525c7837e3 Change autoRefresh value to array instead of string
The array can contain the following strings: DocumentChanged, DocumentSaved, and DocumentClosed.
2016-10-03 22:05:39 +02:00
Allan Odgaard
afa7e4cdc1 Limit syntax highlight parser to first 4096 bytes of line
Ideally this would be a time limit rather than number of bytes, but it’s much easier to limit number of bytes.
2016-10-02 22:51:24 +02:00
Allan Odgaard
1f40f69c07 Only have one parser running at a time (per buffer)
The parser takes time proportional with line length, so if doing a dozen quick edits on a very long line, we could have a dozen parsers running, making the CPU hot.
2016-10-02 22:51:24 +02:00
Allan Odgaard
a378b3d241 Limit CTLine objects to a length of 2048 bytes when creating layout
While it may break some unicode features (mainly mixing in text drawn right-to-left) it improves performance significantly (for files with long lines and no soft wrap).
2016-10-02 22:51:24 +02:00
Allan Odgaard
fbd5455698 fixup! Don’t let untargeted global settings eclipse targeted default settings 2016-10-02 10:23:26 +02:00
Allan Odgaard
d9995df674 Improve performance when toggling foldings at all Levels
Fixes #1137.
2016-10-02 08:08:05 +02:00