I cannot find any information online about Apple dropping support for this, but I also cannot make it work, and it wouldn’t surprise me if they view localized folder names as a security problem.
The Find dialog was already using number formatters, but the tool tips shown in the text view (when doing searches or replacements without going through the find dialog) were not.
This makes a difference when the count is > 999, as it will then format the number with thousand separators.
This was unnecessary indirection as we don’t generally lookup strings for the UI (so TextMate is not actually localizable) and the catalog for the strings we did look up was actually out of date.
The use of an animator proxy is causing the initialize method to be called during animation, and when registering user defaults in initialize, we may trigger key/value observers to be notified, which for this code can result in a crash in OS code with the message: “Trying to recursively lock an os_unfair_lock”.
Some users report a significant delay from executing mate until the TextMate window is brought to front.
The debug information can be extracted by running the following in a terminal:
log show --predicate 'subsystem = "com.macromates.TextMate" && category = "BringToFront"'
Alternatively use `stream` instead of `log` to get a live stream of debug output.
See `man log` for options such as `--start date/time` (to limit the query to e.g. the last 10 minutes)
Trying to save a file as /path/to/symlink will fail with “file does not exist” using the new NSFileManager API, even when the symbolic link does point to an existing file.
This is done by setting `atomicSave` to one of the following values:
always Always use atomic saving (default)
externalVolumes Use for non-internal volumes (e.g. USB drives)
remoteVolumes Use for non-local volumes (e.g. network mounts)
never Never use atomic saving
legacy Always enabled, but do not use NSFileManager
Setting it to `externalVolumes` also includes `remoteVolumes`.
NSFileManager’s approach is inferior to exchangedata(), but as this feature is no longer supported with Apple’s default file system (APFS), there is little reason to maintain our own implementation of the fallback code required when we cannot use exchangedata(), especially as the OS know more about file references (aliases), metadata, and other stuff that should be preserved when writing a new (replacement) file.
In theory the NSFileManager strategy can fail to create the temporary destination, in which case we will pass NULL to open() and crash.
Will fix this in a later commit.
This was done using search and replace. Presumably it should be done in Xcode so that it can adjust the xib for the new deployment target, otherwise what is the point of storing deployment version in the xib and provide it as a command line argument to the xib compiler as well (only to get a warning if the versions do not match)?
The intermediate_t type now wraps the actual saving strategy to make it easier to change strategy based on the destination file system, user preferences, or other factors.
When searching for a regular expression with captures, we have $1-n available in the replacement (format) string.
If this format string does further replacements with optional captures (e.g. /^(_)?foo/) then $1 would be inherited from the parent match, when the optional capture did not match anything.
This bug was introduced in 0b1496011f.
The workaround is untested, as I have not found a way to reproduce the issue, but there is some debug output that can be reviewed and hopefully give some idea as to what is causing the issue.
The debug information can be collected by running the following in a terminal:
log show --predicate 'process = "TextMate" AND eventMessage CONTAINS "loadChildrenForItem:expandChildren:"'
The items can be named “Do something with «unit» / Selection” and TextMate will show the proper title based on whether or not there is a selection, e.g. “Diff ▸ Document With Clipboard” versus “Diff ▸ Selection With Clipboard”.
Previously though, the item titles were not re-generated when changing the hasSelection property, so the user could be presented with stale titles until some other action triggered re-generation, e.g. indicating that an adaptive item works on current line when there is a selection.
This adds buttons for inserting/removing bookmarks and navigate them.
Since the function keys were replaced with the touch bar, there currently is no other way to set and navigate bookmarks other than these buttons so make their visibility priority high.
This was because our windowWillClose: delegate method was never called, as our object was no longer a window delegate, an issue introduced in 709570049f when the superclass was changed to NSWindowController and I erroneously assumed that the superclass would set itself as delegate.
Since we have multiple application targets, it doesn’t make sense with a global APP_NAME variable.
Though if building the frameworks as standalone bundles and embedding them in different applications, we may need some sort of unique component in the bundle identifier, but we currently do not do this (they are all statically linked, so the Info.plist is currently unused).
We previously avoided this link dependency because it would cause a cyclic dependency. The build system does however not error on cycles in the dependency graph as they are all statically linked together (rather than dynamically linking with each other).
Only cycles between root targets would cause a problem.
This changes a bunch of things:
1. Each framework now creates its own include directory for exported headers, and any target linking with this framework, gets that directory added to its include search path. This ensures deterministic behavior, unlike previously where a single shared directory was used, so even if target A did not explicitly link with target B, there was a reasonable chance that target B’s headers would be available when target A was built.
2. There is a new IMPORT keyword to indicate that a target depends on the headers of another framework but does not want to link with it. For example the `commit` shell command imports headers from the CommitWindow framework (related to their communications protocol) but linking with the CommitWindow framework would not be practical (as that would bring in all the resources of the CommitWindow).
3. All embedded targets are signed before being copied to their destination.
4. A new CS_ENTITLEMENTS keyword allows specifying `codesign` entitlements. Currently the hardened runtime is enabled, although this does make development problematic, as modifying files of a running instance (as done during rebuild) can cause TextMate to crash with EXC_BAD_ACCESS (Code Signature Invalid). Worse though, it seems the system has a cache of blacklisted executables indexed by inode. So if e.g. the embedded `mate` executable gets blacklisted, one has to manually remove and rebuild it, before it gets possible to use it again (by default, rebuilding causes the inode to be re-used, but I may change the build system to unlink before copy).
5. The build file no longer contains rules related to deployment. Instead variables are declared that a user build file can reference to extend the build with notarization/deployment rules (without having to hardcode build directory paths).
6. The code has been made modular with a Compiler super class that is subclassed to add support for file transformations (xib, ragel, asset catalogs, etc.) and a transformed file can have its own settings.
7. If target A links with target B, the linker flags of target B will now be included when linking target A.
8. Currently no indexing of help books. Unsure if this is actually useful.
9. Previously it was possible to have umbrella targets that would not generate any output, but just change settings for their sub-targets. This is no longer supported, as the implementation was arcane. I would like to introduce a different system for managing sectioned settings. Related to this; settings in target files are now always merged, regardless of whether using ‘=’ or ‘+=’.
Accessibility rotors allow VoiceOver user to navigate content quickly
by making possible navigation through select elements only.
In this case, we enable VoiceOver users to navigate efficiently
through symbols.
The first way to invoke a rotor is a "global" one (does not take into
account current position in text) and is invoked with VO-U. After
pressing arrow left/right sufficient times to reach "Symbols", one is
presented with a list analogical to the "Jump to symbols" TextMate
feature invokable by Shift-Cmd-T. Arrow up and down then enable
navigating through items, Return selects the result (and jumps to it),
Esc cancels the interface without moving the cursor. Also filtering
the list works by simply typing characters (implemented as
case-insensitive substring search - consistent e.g. with Safari's
"Headings" rotor).
The second way to use a rotor is a "local" one (navigates w.r.t. the
current position in text) and is typically done through Trackpad
Commander (turned on by VO + two finger "screw" gesture to the right
on the Trackpad). Then one uses two-finger "screw" gesture (like
(un)screwing the bottle lid from/to the bottle with thumb and index
finger) to select "Symbols". When this is finally selected (the
selection is persistent), the user can then use flick with one finger
up or down gestures to move to the previous/next occurrence respectively.
I made a choice at one spot - I report the "symbol location - end of
hardline" as the range of the symbol (that is e.g. what VoiceOver
reads when navigating the elements). This seemed to work best for the
user at least in the Objective-C code.
The APIs are 10.13+ only, so appropriate avaiability declarations are
put in place to not cause warnings from the compiler. I was not sure
whether some declaration like that is needed also for the
OakTextView's informal category's conformance to the
`NSAccessibilityCustomRotorItemSearchDelegate` protocol - the protocol
is 10.13+ only too, but the compiler does not warn about conforming to
it. Perhaps the Objective-C runtime is smart enough to take into
account that the `NSAccessibilityCustomRotorItemSearchDelegate` symbol
is (hopefully) weakly-linked and adds conformance to it (I assume
using the `class_addProtocol` function) only when it is non-nil. I
have however not tested whether the compiled app actually degrades
gracefully (without crashing) on macOS 10.12 and earlier, though (for
starters, I seem not to have access to a macOS Sierra image to create
a VM).
The button created on 10.12 or 10.13 has a “Button” label next to it when used in table views (as used in the Find in Project results and Commit sheet).
See https://lists.macromates.com/textmate/2019-January/040883.html.
The issue is caused by commit f850dbdbc7, which added support for font style changes. It did so by applying a single font across the entire string. But, in some cases not all characters (e.g., Chinese or Japanese characters) may be available for that font so these characters would not be rendered correctly while editing.
This fixes the problem where a folder search has been done and the dialog is later re-opened for another project (which will then take ownership) and then selecting one of the old search results: The “select match” is now sent to the project that was active, when the search was performed.
It appears to be ignored on 10.14 but earlier versions of macOS rendered the elements with a shadow, which is probably not a good fit for our current design.