5202 Commits

Author SHA1 Message Date
Allan Odgaard
ed8c9fd798 Checkin release notes for 2.0.5 v2.0.5 2019-12-28 10:22:53 +07:00
Allan Odgaard
a9c668ba39 Simplify NSAttributedString subclass used for menu titles
We now do all the work in NSMenuItem’s setActivationString: and no longer require subclassing the mutable versions of NSAttributedString.

It should now be more transparent what the code does and why it does it.
2019-12-28 09:54:18 +07:00
Allan Odgaard
464fdbfba4 Fix double height of menu items with custom shortcuts
Starting with macOS 10.15 the system will use new NSAttributedString API to obtain bounding rect, so we need to (also) overload this to return our fixed bounding rectangle.
2019-12-28 09:24:30 +07:00
Allan Odgaard
aeec0874b3 Fix warning about invalid ERB trim mode
We don’t care about the trim mode as nobody is reading the generated HTML, but we have to supply something, previously we enabled everything, which is now giving an error despite the documentation saying that trim mode can be “one or more of the following modifiers”:

	%  enables Ruby code processing for lines beginning with %
	<> omit newline for lines starting with <% and ending in %>
	>  omit newline for lines ending in %>
	-  omit blank lines ending in -%>

It would seem that ‘<>’ is mutually exclusive with ‘-’ so now we pass ‘%-’ for trim mode.
2019-12-26 23:20:48 +07:00
Allan Odgaard
2a1553fbd7 Rename custom property to support building with the macOS 10.15 SDK 2019-12-15 13:01:20 +07:00
Allan Odgaard
3a214f6311 Checkin release notes for 2.0.4 v2.0.4 2019-12-15 12:10:51 +07:00
Allan Odgaard
afe008e028 Allow invalid ranges to be passed to nsRangeForRange:
Since this is internal API it should not be necessary to sanitize the range, but based on textmate/bugs#34 it is causing a lot of crashes on macOS 10.15.
2019-12-15 12:06:56 +07:00
Allan Odgaard
504a42307e Passing ‘-deep’ to code sign should no longer be necessary
This is because we ensure that each target copied to another target, gets signed before we copy it.

We initially used ‘-deep’ but that actually never worked fully, as it didn’t find all executables in our bundle, presumably only embedded bundles like frameworks and plug-ins were found and signed.
2019-11-01 08:46:20 +01:00
Allan Odgaard
4f39295aef Checkin release notes for 2.0.3 v2.0.3 2019-10-28 10:25:33 +01:00
Allan Odgaard
362d870563 fixup! Fix issue with FSEvents wrapper when dealing with multiple volumes
The updated code was leaving a trailing slash on directory paths which would make cache lookups fail.
2019-10-28 10:15:13 +01:00
Allan Odgaard
1903a2edec Checkin release notes for 2.0.2 v2.0.2 2019-10-27 15:39:50 +01:00
Allan Odgaard
9565bb4910 Add NSStandardKeyBindingResponding to OakTextView’s interface 2019-10-27 15:27:03 +01:00
Allan Odgaard
0f66772bdb Remove whitespace. 2019-10-27 15:25:53 +01:00
Allan Odgaard
9f339bfcf6 Do not hardcode the type of utf8::iterator_t
This is to allow it to be used with both const and non-const character buffers (the latter being returned from std::string’s data member function).
2019-10-27 15:25:35 +01:00
Allan Odgaard
d5440d86e8 For bundle commands we now write the script to ~/Library/Caches
Previously we used the system’s temporary directory and removed the script after use.

This is because macOS 10.15 will “call home” (notarization?) when executing a new script (that it has not seen before), so with an unstable network connection, running commands could take several seconds.
2019-10-27 15:24:08 +01:00
Allan Odgaard
aff1273d53 Context menu items for tabs would be disabled in full screen mode
Apparently the window’s delegate is not used for context menu actions in full screen mode, although NSApp’s targetForAction: does find the receiver, so this appears to be a framework bug.
2019-10-27 15:20:14 +01:00
Allan Odgaard
82c4e272a4 Remove unnecessary crash reporting diagnostics 2019-10-27 15:18:20 +01:00
Allan Odgaard
5a6cf83e2d Fix issue with FSEvents wrapper when dealing with multiple volumes
The specific issue being addressed is macOS 10.15 where the mount point for ~/Library/Application Support is under /System/Volumes/Data so our assertion that the relative path received in our callback can be appended to the mount point, to match the path being observed, is false.

As a workaround we call realpath() on the path we wish to observe, observe that path, and in our callback we calculate the relative path from the real observed path, and append that to the requested path.

In theory the caller could be made responsible for expanding paths to their real path, but the current abstraction allows observing non-existing paths, which is why it needs to handle this path rewriting.
2019-10-27 15:17:03 +01:00
Allan Odgaard
6f68ea7303 Do not use custom white I-beam cursor on macOS 10.14
The I-beam cursor on macOS 10.14 has a white outline that makes it visible when used with dark themes.
2019-10-14 14:47:38 +02:00
Allan Odgaard
2560ce697d Change placeholder text for license key
The old text (example key) was easily mistaken for having entered a license key into the dialog.
2019-10-14 08:56:48 +02:00
Allan Odgaard
a08987b097 Explicitly zero weak pointer to tab bar view when removed from superview
If one event cycle triggered multiple re-layouts, we could end up reusing a tab bar view that had been removed from its superview because the weak pointer had not yet been cleared (as the view hadn’t yet been fully released).

This could happen during window construction in a scenario like this:

1. Window gets created at some size, tab bar views are created
2. Window size gets restored causing some tab bar views to be removed
3. Active tab gets restored bringing an overflow tab into the visible area, re-using a removed view
2019-10-14 08:38:52 +02:00
Allan Odgaard
4c7b98d0bf Remove superfluous spacing for aligned assignments 2019-10-07 21:28:16 +02:00
Allan Odgaard
079377ed49 Require macOS 10.12 and remove compatibility checks 2019-10-07 21:28:16 +02:00
Allan Odgaard
4b4e5fca8b Remove code required for compatibility with 10.10 and earlier 2019-10-07 21:28:16 +02:00
Allan Odgaard
f83d3b2e14 Checkin release notes for 2.0.1 v2.0.1 2019-10-07 12:37:35 +02:00
Allan Odgaard
990672d1f7 Support macOS 10.11
We don’t yet rely on any 10.12 specific API other than os_log which can be skipped without user impact.

Unfortunately when trying to build for 10.10 using latest Xcode/SDK the linker gives an error for missing symbol: _objc_loadClassref.

Going forward we will require 10.12 but as there is no non-beta build for 10.11 users yet, I wanted to make one.
2019-10-07 12:32:01 +02:00
Max Brunsfeld
ecca53d796 Don't push to the parse stack for rules without while or end patterns 2019-10-07 11:44:25 +02:00
Sam Oldak
ad9229b591 Update Changes.md
typo
2019-10-06 11:09:39 +02:00
Allan Odgaard
07e9e1c65e Make signing depend on the (potential) entitlements file 2019-10-06 11:06:57 +02:00
Allan Odgaard
fee760cf3d Disable the library validation entitlement
This should allow TextMate to load plug-ins that are not signed by Apple or signed with the same team ID as TextMate.
2019-10-06 10:54:23 +02:00
Allan Odgaard
da2a7aa290 Update dialog plug-in (Explicitly close window when disposing a nib) 2019-10-06 10:50:16 +02:00
Allan Odgaard
ce4a1f392f Preserve meta data when saving using NSFileManager’s replaceItemAtURL:
We skip extended attributes and file access control lists on non-local file systems since this has caused problems int he past.
2019-10-06 10:49:10 +02:00
Allan Odgaard
3c7895f578 Simplify code by using NSOffsetRect 2019-10-06 10:35:55 +02:00
Allan Odgaard
54b232f6b1 Checkin release notes for 2.0 v2.0 2019-09-15 17:18:12 +02:00
Allan Odgaard
c4aed6990f Ignore ninja state files (git) 2019-09-15 16:24:09 +02:00
Allan Odgaard
d5d017ea88 Use git’s ‘--reverse’ option instead of ‘tail -r’
This avoids an extra process but also removes a dependency on BSD’s tail command, as support for ‘-r’ is not a POSIX requirement.
2019-09-15 16:20:40 +02:00
Allan Odgaard
d9ac41d790 Add checkbox in Preferences for the disableTabAutoClose setting 2019-09-15 11:26:41 +02:00
Allan Odgaard
d2979e2917 Add GitHub build workflow 2019-09-12 21:14:23 +02:00
Allan Odgaard
360af637e2 Call /bin/cp directly instead of going via PATH
This is because we rely on `-X` (skip extended attributes / resource forks) which is only available with Apple’s version of `cp`, and it is not unlikely that the user has GNU’s version of `cp` available via PATH.
2019-09-12 17:40:51 +02:00
Allan Odgaard
4fbc9ee6ea Fix indentation (spaces → tabs) 2019-09-05 10:01:10 +02:00
Allan Odgaard
77df3c2618 Remove the decompile_as target as it is no longer used
See b05fe06abe
2019-09-05 10:00:19 +02:00
Ronald Wampler
4820e876d2 Only allow navigating bookmarks in the touch bar
See https://lists.macromates.com/textmate/2019-August/041082.html
2019-09-05 09:59:44 +02:00
Allan Odgaard
aa10cd1e57 Checkin release notes for 2.0-rc.31 v2.0-rc.31 2019-08-26 21:49:58 +02:00
Allan Odgaard
562c6f519b Add missing boundary check when accessing undo/redo stack 2019-08-26 21:45:25 +02:00
Allan Odgaard
7116dd777f Workaround for potential stall when calling mate with inactive TextMate
The issue appears to be that accessing the clipboard, as part of setting up a normal document window, will stall when trying to connect to the system’s clipboard server.

Here’s the relevant stack trace:

    -[OakPasteboard checkForExternalPasteboardChanges]
      -[NSPasteboard stringForType:]
        -[NSPasteboard _dataForType:securityScoped:]
          -[NSPasteboard _dataForType:index:usesPboardTypes:combinesItems:securityScoped:]
            -[NSPasteboard _dataWithoutConversionForTypeIdentifier:securityScoped:]
              CFPasteboardCopyData  (in CoreFoundation)
                ___onqueue_CFPasteboardRequestDataFromDaemon_block_invoke.341
                  usleep  (in libsystem_c.dylib)
                    nanosleep  (in libsystem_c.dylib)
                      __semwait_signal  (in libsystem_kernel.dylib)
2019-08-26 21:34:52 +02:00
Allan Odgaard
36dc1374f9 Revert "Add debug output when TextMate is activated via mate"
This reverts the following 3 commits:

- commit 306d46ec71
- commit eecfe6e619
- commit 2ffc74ad8b
2019-08-26 21:19:17 +02:00
Allan Odgaard
a6ac1b9bf7 Make commands used during build relative to __FILE__ 2019-08-25 14:13:16 +02:00
Allan Odgaard
cf3fe7c575 Fix buffer overflow bug
Without the boundary check we would write one byte beyond the end of the stack-allocated ‘first’ array.
2019-08-25 13:16:10 +02:00
Allan Odgaard
88e5f1cd3c Checkin release notes for 2.0-rc.30 v2.0-rc.30 2019-08-21 11:56:45 +02:00
Allan Odgaard
306d46ec71 Add even more debug output for when TextMate is activated via mate 2019-08-21 11:51:26 +02:00