See commits at GitHub.
Using background-size: 50% results in really bad scrolling performance and doesn't not achieve the effect of scaling the image to double the pixel density, it rather sets the image width to 50% of the element. Using the non-retina image size solves both the problems. A similar issue was found in this SO page: https://stackoverflow.com/a/7034772
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.
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).
See https://lists.macromates.com/textmate/2019-January/040883.html. The issue is caused by commit f850dbdbc772814372ad84f8740ea8234950cc5d, 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.
See https://github.com/kkos/oniguruma/issues/1.
The use of this framework was dropped in 4d82e4b109d353a565db3589138d7dcba3fa8fb6.
Also, reworked the OFBFinderTagsChooser to have a similar look as on 10.14.
macOS 10.10 SDK introduced new protocol-based accessibility APIs. The old accessibility APIs are now deprecated. These APIs require a minimum deployment target of 10.10, which is fulfilled since TextMate 2.0 rc 12. Main changes connected with this new API is that it is statically typed, so it is no longer necessary to convert parameters from (and results to) NSValue objects. Still some of the weakly-typed original APIs are not deprecated and have no alternative in the new API, notably e.g. the accessibilityArray* methods, so they are kept.
Although our minimum target is 10.10, we currently (dd41b992f70e66aac122e8a8479c65365d1375ab) only support compiling with Xcode 9, which has the macOS 10.13 SDK.
The feature is currently not exposed via the UI. To enable set the changeThemeBasedOnAppearance defaults key to YES and assign the darkModeThemeUUID and universalThemeUUID default keys with the desired theme uuids to use in dark or light mode, respectively.
OakSyntaxFormatter now applies background colors only when they do not match the theme's global background color. The old behavior drew the background all the time, which looked off when drawing formatted text in the Find History list. This effect is made especially apparent by macOS 10.14's translucent combo boxes, and now that they're used for history in the Find dialog, this needed to be fixed.
⌃⇧⇥ and ⌃⇥ are the preferred system wide shortcuts for changing tabs. In order to avoid a disruptive change, the previous shortcuts are still supported (in fact, it appears that all apps using the system tabbing mechanism support the previous shortcuts as well).
This makes the Window menu more consistent with system apps.
We compile all assets into one file that resides in the main app bundle so while we can have multiple asset catalogs (per Framework, etc.), individual assets should still be namespaced.
Also, switch to use the new divider styles in most places. The remaining usage of the old "OakCreateLine" functions are in the OakChooser windows. These will be refactor for better dark mode support next.
Detected by `Wdelete-non-virtual-dtor`.
This suppresses the warning `Wdelete-non-virtual-dtor`. AFAICT, the existing usage isn't necessarily wrong (i.e., we don't delete through them) so another way to resolve the warning is to mark the classes that inherit from them, e.g., `buffer_t` as `final`.
Newer versions of clang now warn when using API's that are only available on OS version newer than the target OS unless they are guarded using `@available`. This is temporary and should be remove when we move away from older versions of Xcode.
Also, always remove our background view before attempting to add another one.
Also set the style to `OakBackgroundFillViewStyleHeader`.
This introduces the `OakBackgroundFillViewStyle` enum with styles that are dark mode aware and should lead to more consistent use between UI elements in the future. Also, convert OTVStatusBar and OFBHeaderView to use the new style enum.
New setting that prevents deleted files from appearing in the file browser while still uncommitted. There seems to be some demand for this (https://stackoverflow.com/questions/17590302/textmate-2-alpha-showing-references-for-deleted-files , https://stackoverflow.com/questions/50428259/how-can-i-keep-deleted-files-from-showing-up-in-textmate-2-file-browser-sidebar), and it's just a nice option to have.
Apple writes the encoding charset (e.g., com.apple.TextEncoding) in all lowercase (at least since macOS 10.9); however, TextMate assumes that the encoding will always be uppercase. So in order to avoid any issues with case mismatches, when setting the charset, uppercase the given string. See http://lists.macromates.com/textmate/2018-April/040602.html
This will make the system properly recognize D source files.
This enables QuickLook preview for text files without extension such as README, LICENSE, etc.
Versions of the OS X 10.11 SDK prior to 10.11.4 require this to be done explicitly. This fixes the build on OS X 10.10 when using the OS X 10.11 SDK from Xcode 7.2.1 and earlier.
Modern multimarkdown tends to convert the <% and %> tags into HTML when they occur before or after an empty line. This would then break parsing with erb. Remove all empty lines in the vicinity of these tags to prevent this problem. Sent in by @neverpanic through @ryandesign
On 10.13, just setting our instance of OakChoiceMenu to `nil` no longer seem to close our window.
This is needed after commit 2748e12699063dd92d0211d36b32ccf44a7bc103.
Building with c++1z support on the latest version of clang on High Sierra (10.13) causes a couple of runtime crashes.
Since our minimum target is now 10.9, clang will default to use and link with libc++ instead of libstdc++. This also reverts commit 162b3dee2c08fa235718f54852644548bec68d15.
Starting in Clang 5, lookup with nested-class names is stricter (e.g., A::A now specifically refers to the constructor name).
C++17 added a non-const overload for std::string::data().
This is implemented as an alternate menu item to "Copy" like in Finder.
Most of these layout changes are related to the common pattern we used to set constraints for "dividers", where one of the dividers is specified to be connected to both edges of its superview then setting the other dividers' constraints to have equal widths (e.g., @"H:|[divider(==divider2,==divider3)]"). On 10.12, this now appears to result in ambiguous layout. We can resolve it by connecting at least one of the edges for each divider to its superview.
This reverts commit 9e4e88ce76a334abe01f79e9d355623beac75831. CGEventFlags is (correctly) defined in the 10.12 sdk as: typedef CF_OPTIONS(uint64_t, CGEventFlags)
The textClipping file is saved as a binary plist on 10.11 and 10.12 (I could not verify 10.10) so we can eventually replace the use of FSRef here as well.
This is just a C++ wrapper around the Cocoa API for moving a file to trash.
Although this is actually deprecated in 10.10, new APIs are available in 10.9 and it will make addressing deprecation warnings when upgrading to 10.10 easier.
Although this is actually deprecated in 10.10, new APIs are available in 10.9 and it will make addressing deprecation warnings when upgrading to 10.10 easier.
Although this is actually deprecated in 10.10, new APIs are available in 10.9 and it will make addressing deprecation warnings when upgrading to 10.10 easier.
Also removed `OakSheetCallbackDelegate` since it's no longer used now.
Fixed typo when comparing
To change the title, set `tabTitle` in `.tm_properties` to something other than `$TM_DISPLAYNAME`.
This header was removed in commit 2ffbfe02a568a41283b2bd4e7a27a69fcbb03aa7.
This reimplements 9c3923b4854a9bf910c6a26531e77f2be8524aba, which was accidentally lost in refactoring.
The current [RFC][] document that describes [ABNF][] specifies in section “2.2. Rule Form”, that ABNF grammars use CRLF (Carriage Return + Line Feed) as rule/line separator. We therefore set the default line ending for the scope `source.abnf` to `"\r\n"`. [ABNF]: https://en.wikipedia.org/wiki/Augmented_Backus–Naur_form [RFC]: https://tools.ietf.org/html/rfc5234
This brings us a bit of extra type safety, for example where an integer is expected, nullptr should be disallowed by the compiler (unlike NULL).
The latter is deprecated in C++14 and will be removed in C++17
This makes the text easier to see against the yellow background.
Apple's clang (Apple LLVM version 8.0.0 (clang-800.0.24.1)) as shipped with Xcode 8 now supports `thread_local`. This effectively reverts commits: 14c6a70 f3d1aba 9d1d1a1a and 172ce9d.
We need to set the row height after calling sizeToFit on textField.
This more closely matches the behavior of NSTextView.
Another common practice among Mac apps.
This style is a de facto standard across a handful of popular Mac apps.
This allows tests to pass even when a global .gitconfig has gpgsign=true.
This was never necessary since our documentView will set this to document_ptr() when it's released, though it was harmless. But now, document_ptr is just a thin wrapper around OakDocument and the default constructor does nothing. As a result we were basically setting the text view OakDocument instance to nil. After commit f9e02d9, when the commit window closes, this would noticeably cause the text view to turn "white" when using a dark theme.
While we want to show the font scale factor as a percentage in the UI, internally, we should represent it as a CGFloat, which is more consistent with the NSFont APIs and makes interacting with them easier.
This allows strings longer than our max width to still align up properly with the corresponding insertion text.
This scope can be used to support the Swift Package Manager tools (e.g., `swift build`).
On 10.12 beta 3, when closing a window, the following exception is thrown: Exception Name: NSInternalInconsistencyException Description: <GutterView 0x7fa71c511150> has reached dealloc but still has a super view. Super views strongly reference there children, so this is being over-released, or has been over-released in the past. Despite the mention of our GutterView instance being over-released, the actual problem is that we do not call super in our override of `removeFromSuperView`, where we nil out our partner view. A simple fix to avoid crashing would be just calling super in that method so that the view is marked as being removed; however, we can simplify the code and eliminate the need to override our super's method by using a weak reference instead and let ARC automatically handle the zeroing of our partner view.
Since these are pure C++ libraries, they are not managed by ARC. This commit partially reverts 469fd74a7b6784c3eaec6618.
We can pass `NULL` to `topLevelObjects` since we have a strong IBOutlet to the NSPanel (our top-level object).
This suppresses the below warning when compiling xibs with Xcode 7 or later. warning: This file is set to build for a version older than the deployment target. Functionality may be limited. [9] We should revisit this when we update our minimum deployment target to 10.8 or higher, as it may not be needed.
Also edit the source to reflect the change in name (e.g., `updateGoToMenu:` → `updateSelectTabMenu:`).
defaults to textView fontName
The Navigate menu now contains a mixture of items with prefixes "Jump to", "Go to" or none at all. The "Go to" prefix is especially inconsistent since we have already have a dedicate "Go" item in the Main menu bar. For consistency, change them to use the "Jump to" prefix. The commit also renames the appropriate dialog boxes and updates some documentation to refer to the new names.
Most Apple applications have this item placed under Edit → Find; however, it fits more naturally in our Navigate menu.
When building with Xcode 8 beta (on my system at least), clang produced the following warning: clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 It appears clang will link with libstdc++ if present by default instead of libc++. This was verified using `otool -L bundles.dylib` which produce the following output prior to this change. bundles.dylib: @rpath/bundles.dylib (compatibility version 1.0.0, current version 1.0.1) @rpath/OakSystem.dylib (compatibility version 1.0.0, current version 1.0.1) @rpath/io.dylib (compatibility version 1.0.0, current version 1.0.1) @rpath/plist.dylib (compatibility version 1.0.0, current version 1.0.1) @rpath/regexp.dylib (compatibility version 1.0.0, current version 1.0.1) @rpath/scope.dylib (compatibility version 1.0.0, current version 1.0.1) @rpath/text.dylib (compatibility version 1.0.0, current version 1.0.1) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1) With this change the output is now: bundles.dylib: @rpath/bundles.dylib (compatibility version 1.0.0, current version 1.0.1) @rpath/OakSystem.dylib (compatibility version 1.0.0, current version 1.0.1) @rpath/io.dylib (compatibility version 1.0.0, current version 1.0.1) @rpath/plist.dylib (compatibility version 1.0.0, current version 1.0.1) @rpath/regexp.dylib (compatibility version 1.0.0, current version 1.0.1) @rpath/scope.dylib (compatibility version 1.0.0, current version 1.0.1) @rpath/text.dylib (compatibility version 1.0.0, current version 1.0.1) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
This introduces new scope setting - excludeFromParagraphSelection, that prevents extending selection to some scopes, eg. on comment.line. Previously when reformatting paragraph comment lines were selected as paragraph lines, this have led to mixing comment content into reformatted paragraph content breaking the syntax of reformatted code, eg.: some very long ... line of text # some comment some other long ... line of text As an effect we got: some very long ... ... text # some comment some other ... ... line of text The problem described above was especially visible when using ⌃Q to Reformat block of Git commit message, when below of the typed text there was a Git default comment. Also this problem could be noticeable by authors using LaTeX. This change checks whether a candidate line scope for paragraph extension has a excludeFromParagraphSelection set to true and breaks upon such line, eg. comment line. Doing Select Paragraph ⌃⌥P again will select the comment as well.
This can be toggled using View → Show/Hide Indent Guides or controlled per file type via the `showIndentGuides` setting in `.tm_properties`.
TextMate highlights certain character pairs (e.g. { }) when the caret passes over either of the characters. It can be useful to double click to select the text in between and including the character pairs for deleting code, copying code, for visually differentiating the affected code, etc. Add a select_unit_type, kSelectionExtendToWordOrTypingPair, to select the inclusive bounds of a typing pair if a match is found, or otherwise select a word as normal. This patch is free and released into the public domain.
This is necessary to prevent resizing of the document view when removing and then immediately adding a new constraint to the document view.
This sets '' (empty identifier) in Global.tmProperties that switches to system specified spelling language (usually Automatic by Default which is OS X default). It serves as a way back to the default when user picks any other language than default from the menu for current buffer (effectively for documents's directory).
Otherwise we get syntax error reading back the value from Global.tmProperties.
This partially reverts changes of 3fdc72b93af0167e234c48314658d702f65a8a5f: Support spell checking being “automatic by language”. Before 3fdc72b spellingLanguage .tm_properties setting (default "en") was the only way to set spelling language for file (buffer). English was default language for all files. 3fdc72b introduced change that when “automatic by language” was selected in system's spelling panel then TextMate was ignoring spellingLanguage setting and was using automatic by language. However because “automatic by language” is default on OS X, effectively 3fdc72b makes spellingLanguage setting no longer effective. To make it work one needs to set explicit spelling language either in System Preferences or in spelling panel upon each TextMate run (since this is getting reset after application restart) - which is counter-intuitive, can be treated as regression and it is vaguely described in ChangeLog: * Support spell checking being “automatic by language”. This is set via the spelling panel. This change presents alternative approach, introducing new empty spellingLanguage setting "" (which is now default), which makes use system panel language setting, including “automatic by language”. From now on all files will be checked against system panel selected language (or automatic), unless .tm_properties project specifies explicitly language for given file using, eg.: [ locale-en_US.ini ] spellingLanguage = en_US [ locale-pl_PL.ini ] spellingLanguage = pl_PL Or automatically depending on file name: [ locale-*.ini ] spellingLanguage = '${TM_FILEPATH/^.*locale-([a-z]+_[A-Z]+).*$/$1/}'
It's possible that the path on the document is set even though it does not exist on disk. E.g., when using `mate` to create a new document from the command line.
It seems that the "showDefinitionForAttributedString:" can accept a nil argument, but not an empty string. The inserted test is preventing the call when the extracted string contains no characters.
Running tests in parallel (which is the default) results in spurious failures in the `scm` git tests, probably due to an undiagnosed race condition. This change lets tests run serially by default, but provides a flag `-p` (or `--parallel`) which enables running them in parallel again. It also adds a variable `test_flags` which is passed to each test run, and which can be set by running env test="-v" ./configure
The `gen_credits` scripts can spuriously fail raising this error in the `user_by_email` method NoMethodError: undefined method `[]' for nil:NilClass when `YAML.load(response.body)` returns nil. This change protects the build against these failures by returning nil early.
Compiling code that uses the `bug` macro while the `NDEBUG` symbol is defined (which it is by default) results in “expression result unused” warnings for each argument to the `bug` call. This change adds the parameter declaration from the debug version to the non-debug version, which silences these warnings.
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.
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.
This reverts commit 2c6ad9b391a82e5334feb139eb53bea8b21e92b9. Upstream released a new version, which resolved the warnings this commit meant to suppress.
This seems to be necessary when the document occupies less space than the visible document window.
We no longer use Apple's headers for `openssl` so this isn't necessary.
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.
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.
This property's name was conflicting with a private instance variable in our superclass (NSOutlineView) for the 10.11 SDK.
These were informal protocols prior to 10.11.
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.
Also, disable unknown-pragmas warning for older version of clang.
Also, changed the `newFlagState` property to use the enum type.
With the boost thread helper we have to statically link to the boost libraries, which on most system is built against the latest version of the OS (instead of our current target 10.7). This doesn't seem to be an actual problem, but newer versions of clang issue warnings about it.
This is a lightweight wrapper around the pthread methods to access thread local memory.
This suppress a warning with the latest version of clang shipped with Xcode 6.3.
This suppresses a couple of warnings with the latest version of clang shipped with Xcode 6.3.
The new version of clang (Apple LLVM version 6.1.0) as shipped with Xcode 6.3, disabled TLS. According to http://clang.llvm.org/cxx_status.html, in order to support `thread_local`, the C++ runtime library from g++-4.8 or later is needed. For now, we can use the boost `thread_specific_ptr`. This is probably a reasonable solution since 1) it should be portable with old and future versions of (Apple's) clang and 2) requires no additional dependencies.
The static `std::map` instance (named just `map`, on line 79) had its initializer template params in the wrong order, which kept it from compiling. Swapping them as per this PR lets `indent` build and run with no issues.
The NSComboBox, whose pop-up list has shadow, and so it will be nice for this similar control.
To allow the alternate behavior (“close other”) when clicking a tab with the middle mouse button.
Using NSTextFieldCell instead default NSCell together with NSTableViewSelectionHighlightStyleSourceList on Yosemite causes cells get light gray color, making the whole list dull and unreadable. Workaround that setting cell's `textColor` to `[NSColor textColor]`.
This applies to tabs above document case.
This is more inline with Safar, Xcode & Terminal look on Yosemite.
Added a const reference to avoid the unnecessary copies when using `auto` in range-based for loops. One can find other instances in the code base where we could probably avoid making copies in similar situations, but I did not want to create the patch noise. The intention here is just to correct the obvious mistake and avoid repeating it in the future.
We do not modify these properties after initialization. Furthermore, where we do access them, we mark them as `const`.
While these properties are initialized to zero upon `alloc`, I think it makes the code easier to follow to explicitly set `leftPadding` and `rightPadding` to zero (if zero is desired) since the reader does not have to look around to ensure they aren't being set elsewhere.
This is enabled via the ‘showFavoritesInsteadOfUntitled’ defaults key.
Currently, if the scm disable, we would show it as "Unversion". For clarity let's status that it's disabled.
We set the attribute scopes `attr.scm.*` in two different places in DocumentController; however, we only export TM_SCM_NAME if the scm variables are present. So if `scmStatus` is not enabled, TM_SCM_NAME is never set or exported, but `attr.scm.*` can still be present.
We original exported this for the commit window, which no longer uses it.
When VoiceOver users want to efficiently find an item in a list, they often go through the items quickly, hearing just first few characters to decide whether it is the item they want or whether it is positively not the one (in which case they move to the next item). Therefore it is necessary for each row (item) of a table to be worded in such a way for VoiceOver so that the most important piece of information is read first, then followed by the less important piece of information, etc. E.g. for the file chooser, the most important piece of information about a file is its file name. So we put that first for the VoiceOver user. If they are unsure whether it is the right one (perhaps because there is more than one file with the same name in different directories), then path to the file is read after that. Fixes textmate/bugs#10
Unfortunately, the text field is difficult to center properly (right/left arrow mode) since prior to 10.10 the popover's contents was set at inset (2, 2, 2, 2).
As far as I can tell we only add objects to `_project`, but we never actually use it.
Also rename NSString category from "Path" to "Additions".
We have removed the use of this category method from the rest of the code base. Refactor `FSXcodeProjectDataSource` so that we can delete it entirely.
The new layout allows us to place the action button back in its original place when the table is revealed.
With the previous refactoring the new name is more appropriate.
The view layout is rearranged in order to animate showing the table, which is now shown below the toggle button with the Cancel and Commit buttons sliding down. Additionally, when not showing the table we remove all relevant views from memory.
This way the settings can also be applied in the Commit Window (and .git/MERGE_MSG).
This is so that the commit window’s text view sources project specific settings.
This puts the VoiceOver user experience in OakChooser on par with Spotlight in Yosemite which also announces currently selected item after every edit in the search field. This provides the user with feedback so they know whether the search result changed or did not change after typing/deleting in the search field. A manual AXSelectedRowsChanged notification is used - see http://lists.apple.com/archives/accessibility-dev/2014/Aug/msg00024.html for discussion about this. This change is Yosemite-only. While pre-Yosemite OS could probably be supported in the way it is now for the case when the user moves the table results with arrow up/down, I did not have time to fiddle with it and given that Yosemite will be released soon, I am not sure it will be worth the effort.
Implements a TODO. A close-tab is now sent to clean up documents that failed to open properly, and a close-window is further sent if appropriate.
Previously, scmStatus would not be enabled on remote volumes even if, say, a .tm_properties setting explicitly matched a remote volume and set scmStatus = true. This patch allows setting scmStatus = everyDisk to skip the local-volume check. Also defined are scmStatus = localDisk and systemDisk. localDisk is the same as true (and is the default as before), systemDisk only enables files on the "/" volume.
Integrate visually file manager header in tab bar when tabs above document option in on. If tabs above document are off then use default gradient L&F. Bottom divider for file browser header view is not integrated in header for easier control if it is shown or not.
This workaround is to avoid a couple of undesired behaviors in the `HTMLOutputWindow` when the web page implements keyboard commands such as Git → Browse Annotated File (Blame). Namely, when using the keyboard commands, we would always receive an NSBeep. Also, fixed an issue when these key commands may conflict with menu keys. See comment in the commit for details.
Previously, the commit window was changed from a "always on top" window to a more typical window that could be minimized or sent to the background. While this made viewing the diffs more convenient, we could easily loose track of it or at worst end up with multiple dangling commit windows. By making it document modal, this prevents dangling windows. Furthermore, since the commit window is now attached to the main project window and the file browser already has the SCM status, we hide the file list by default and dropped the action button. Users can choose to show the file list via a checkbox and the action button's menu is still available via the file list's context menu.
This improves the chance that someone googling for a certain accessibility attribute or other accessibility constant in order to find inspiration how to implement it will find our code in OakTextView. It also makes the code more understandable for reading by someone else, and generally follows the way others write accessibility code (including Apple in their code samples). It does make the code more verbose, but I think that does not outweight the above advantages. Inspired by: googling and "githubbing" for NSAccessibilityLinkTextAttribute: http://lists.apple.com/archives/accessibility-dev/2014/Aug/msg00016.html
This was found using clang's static analyzer.
These methods were deprecated in 10.7. Use `convertRectToScreen:` and `convertRectFromScreen:` instead. This is required for proper high resolution support.
These methods were deprecated in 10.7 and log warnings in the console when called. The documentation says to use `convertPointToBacking:` and `convertPointFromBacking:`, respectively, instead; however, these methods should not really be used in this case. We just want to store the top left position (point) of the OakChoiceMenu's frame in the OakDocumentView's coordinate systems so we can update its frame to the new position when OakDocumentView's bounds change. We do not need exact pixel alignment. The original choice to use the above deprecated methods was probably based on the use of `convertBaseToScreen:` and `convertScreenToBase:`, but these were also deprecated in 10.7. They can be replaced with the equivalent `convertRectToScreen:` and `convertRectFromScreen:`, respectively. So instead, for this case, `convertRect:toView:` and `convertRect:fromView:` suffices and actually yields better tracking. (We could have used the corresponding "point" methods, as well, but we needed to convert the point to a NSRect to use `convertScreenFromRect:`, etc.) With the original code, when the view bounds change, the position of the OakChoiceMenu would extend well below/above the placement of the caret.
Originally, the "--ask" option was used in the previous commit window to change the NSTextField above the text view; however, no SCM bundles (in textmate's repos) currently uses it.
If `enableLoopFilterList` is set to `YES`: - when at top, pressing <Up> selects the last item on bottom - when at bottom, pressing <Down> selects the first item on top
The implements the space invisible using the new method of drawing the invisibles so it does not affect right-to-left text.
Rather than putting tabs in their own node, leave them in the text nodes and allow core text to handle the size. This fixes the issue with using tabs in right-to-left text.
I experimented a lot with different combination of attributes, this one works reasonably well compared to the others (even though it is less feature complete). I may revisit experimenting with it at some later point.
More specifically item's displayed keyboard shortcut or tab trigger is now announced by VoiceOver. Implementation of accessibilityAttributeValue:forParameter: returns nil for some attributes. This is a hack to avoid doing tedious adjustments of certain parameterized attributes (like AXStringForRange, AXAttributedStringForRange, AXBoundsForRange, AXRTFForRange) for string AXValue that is extended (appended) by extra information at its end in accessibilityAttributeValue:. To get an idea how tedious this is (even though our case is a bit simpler by not *prepending* anything before the AXValue, and not being an editable field), look at OakLinkedSearchFieldCell. This looses the ability for the user to interact with the text, but considering how seldom this will be used (if at all), for now this seems acceptable. This is needed because VoiceOver asks for the *StringForRange attributes and if implemented, will never query AXValue (which is where our custom behavior is). In the future when tables will be migrated from cell-based to view-based ones, the tab trigger or shortcut could be a separate NSView, which would probably allow for much more elegant solution to this problem.
Previously we used [NSCell stringValue], which is not suited for cells with custom implementation for AXValue accessibility attribute.
Previously using ⌘F with a multiline selection would automatically set the “in” pop-up to “Document”. This is no longer the case, but can be brought back by running: `defaults write alwaysFindInDocument -bool YES`
Add a bit of redundant code but it's useless to continue doing stuff if the request is cancelled by the user anyway.
Read at most 1 KiB or 50 lines of a file and render the attributed string in a bitmap context. The theme is set to Mac Classic to ensure a white background for best look when the previews are used as icons in Finder. The user’s default fixed width font in size 4 is used. With this font size only around 7 lines are shown, so we need to make it smaller, but we probably want to scale down the result to allow fractional line heights. A lot of code is copy/pasted from the QuickLook preview generator.
Default is to suppress any warnings for unassociated GitHub profiles.
This prevents `tableView:objectValueForTableColumn:row:` from throwing an exception (index beyond bounds) when the user deletes the last row while it is being edited.
This makes Zoom support avoid doing all 2 conversions between UTF-8 to UTF-16, and replaces call to rect_for_range with call to rect_at_index, which is more efficient. Note that this is a typical micro-optimization not resulting from any actual performance measurement, but just from a desire to have a lean code not doing redundant work.
When setSelectionString is called during editing of text (like inserting or deleting a character), it catches layout in a semi-consistent state where horizontal position of individual characters cannot be determined. Therefore during such events, we cannot pass the correct screen position to the call to UAZoomChangeFocus. So let's do the UAZoomChangeFocus call after this iteration of run loop. This ensures everything in layout that had to update has updated when calling UAZoomChangeFocus, thus enabling us to provide correct horizontal screen position.
bol_as_eol was meant for non-empty ranges, but the only place where empty ranges were attempted with bol_as_eol was for Zoom tracking, and it seems like I did not re-test Zoom after making the bol_as_eol commit. Fixes textmate/bugs#4
Since variable strings can be very long and we reduced the font size in the bundle table, let's be consistent and use a smaller font size here too.
By using a smaller font size in the bundle table we can show more of the bundle description. Also, it minimizes the amount of resizing of the pane we have to do to see the entire description string for most of the bundles.
When rebuilding textmate from scratch: git clean -xffd; git reset --hard HEAD; rm -rf ~/build/TextMate/; ./configure; ninja This error appears: Frameworks/OakAppKit/src/OakTabBarView.mm:7:9: fatal error: 'OakAppKit/OakFileIconImage.h' file not found After one issues "ninja" again, textmate continues building fine. I guess this might be because perhaps OakAppKit's headers are being copied to the build include directory (~/build/TextMate/include) in parallel when building OakTabBarView.mm. No matter what actually is the case, this patch fixes building during clean build.
In other words, I don't like build warnings of any kind :-) And they deserve credit for their contributions.
This new 10.10 API allows one to mark, for some UI element, a set of UI elements to track selection. VoiceOver (and other accessibility clients) will then track and announce selection (cursor) changes not only in the currently focused element, but also for all elements contained in its "shared focus elements" array. This is a perfect fit for search field with a table of results. In fact it is used for new 10.10 Spotlight - its search field's shared focus element is the table containing the results. As NSAccessibilitySharedFocusElementsAttribute is available only in the 10.10 SDK, so make a way to use its value with previous SDKs (with which TextMate is currently compiled). We also retain the kind-of-hacky solution for pre-10.10 OSes introduced in and instead use NSAccessibilitySharedFocusElementsAttribute. This code was tested in all 6 fields of a 3×2 matrix: * compiled with 10.8, 10.9 and 10.10 SDK * run on 10.9 and 10.10 (DP2) For user, this means more standard behavior (says the same "completion selected" thing as with Spotlight) and a bit more correctness (no extra space before beginning / after end of search field on braille display). For developer, this means once we stop supporting 10.9, we will be ready to drop a lot of code which, while serving us well to make the choosers more user friendly on pre-10.10, will no longer be needed.
Now it matches more way other OSX elements are inset both on Retina and non-Retina displays.
Now it supports properly Retina using Cocoa rounded corner rendering instead pixel patches. All colors are now references by name.
This lets layout file refer to color names instead hardcoding color hex values. Also colors referenced by name can return different values depending on OSX version, which will in future solve problems with OSX 10.10 Yosemite L&F.
This allows drawing rounded layers with border in resolution independent manner. Also it reduces number of layers needed to certain UI elements.
10.10 SDK makes NSLineBreakMode into a proper NS_ENUM enum (in 10.9 SDK it was a plain typedef for NSUInteger with some integer NSLineBreak* values conveniently available for it in an anonymous enum). Nevertheless, attr_string code should have always used NSLineBreakMode instead of NSUInteger (unless I am missing something like values in style::line_break::mode that do not correspond to the enum), so this commit makes it so and thus also fixes building with 10.10 SDK.
This allow the check mark to be properly spaced with respect to its item.
This change was prompted by the appearance of the `tabSizePopUp` button in the status bar. After dismissing the menu, the title would be disabled. To ensure we do not have similar issues elsewhere, let's prefer the use of `NULL` to `nop:` when assigning the action for menu items unless we are sure that the menu item should always be disabled (e.g., the item is used as a label).
This seems to have been overlooked since most of logic was already implemented. There is one known issue that exists when restoring sessions. Namely, after restoring a session only those documents (tabs), which have been actively "viewed" are considered "opened".
This fixes a regression. The previous commit window allowed a "--log" option to be specified that would pre-populate the text view with the given argument.
Per https://www.mikeash.com/pyblog/friday-qa-2009-05-22-objective-c-class-loading-and-initialization.html
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.
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.
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).
This will be used by OakCommitWindow. Also removed extraneous whitespaces.
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)
Accessibility labels now can be specified conveniently as a parameter of a UI construction function.
This function makes it easy to set accessibility "labels" for UI elements. It is flexible - takes care of NSView vs. NSControl case, labels can be specified directly as a string or as a user interface element.
While code reuse is an added benefit, the main motivation was to fix the appearance of the action popup button in the Find window. The first (placeholder) item in the Find window's action button was assigned a nop action so that when the button was clicked and it's menu validated, the "action" image would always appear as disabled.
ZWNJ is so common in Persian texts, and its unicode bi-direction class in neutral. But the representation chunk contains latin characters and are so left-to-right. So, when ZWNJ is replaced by the representation chunk, rtl texts are rendered incorrectly. ZWJ and ZWSP are from the same class, but less common at least in Persian texts.
Currently for VoiceOver user when the text cursor is at the end of the search field (which is 99% of the time) and the user wants to navigate the results in the table view using arrow down, then after each arrow down, VoiceOver first plays a "end-of-text" sound, then announces whole contents of the search field, and only then announces the newly selected search result. (The same happens when text cursor is at the beginning of the search field and user presses arrow up.) This is probably a bug in the way AppKit handles text field accessibility - see http://lists.apple.com/archives/accessibility-dev/2014/Feb/msg00019.html I also reported this as <rdar://problem/16271507> I hereby present a hacky workaround for this - a subclass of NSSearchField that tricks accessibility into thinking there is one extra space before and after the text in the search field. Therefore VoiceOver will not think the user is at the end of text when they actually are, and therefore will not play the "end-of-text" sound and announce whole contents of the search field before getting to the information user wants (the newly selected search result). While this is a bit hacky, along with the previous commit it allows VoiceOver to have the same instant great experience as a sighted user when filtering and browsing results in OakChooser. So I think it's worth the hackiness until there is a better alternative. There is only last issue, as currently VoiceOver is very chatty when the OakChooser window appears: first says "Go to file", if user interrupts it with an action (i.e. moving VO cursor or typing a character), then VoiceOver starts telling the whole title of the window, and only after user interrupts it again does VoiceOver say or announce only the user actions (including search results table selection change). So the simpliest if the user wants to start navigating the table items immediately after showing the OakChooser's window (i.e. without entering a search term) is to, after showing the OakChooser (e.g. with ⌘T or ⇧⌘T), quickly type any letter and immediately delete it with backspace and then use arrow down/up.
This solves accessibility of situation of a user browsing results in OakChooser (currently File Chooser and Symbol Chooser). Typically the user is in search field and after typing the search string wants to use arrow down and up to browse results. The problem this presented to accessibility was that VoiceOver reads only changes of selection in the current VoiceOver item. As the user is on the search field but the selection changes in the results table below, VoiceOver did not read the various search results when pressing arrow up/down. Alternative was to leave the search field, move to the results table, interact with it and then navigate it with VoiceOver. This is however not the desired user experience comparable to that of sighted users, as the VoiceOver user still has to do quite a few steps after entering the search string to browse the results, not to speak about the situation when the user would like to change the search string - he/she would need to leave the table and get back to the search field. This solves the problem by making the search field (or more generally any user interface element that triggers change of selection in the results table, which should be the element the VoiceOver cursor is on) announce to accessibility the contents of the selected row in search results table. See this thread on accessibility-dev mailing list where the options for implementing such a user interface in an accessible way are discussed: http://lists.apple.com/archives/accessibility-dev/2013/Dec/msg00000.html and http://lists.apple.com/archives/accessibility-dev/2014/Feb/msg00016.html If the user did not move selection (it is on the first line) and they want to hear it, they should use arrow up to hear it. Then they can use arrow down to move through results.
An option called "Auto-reveal open file in project browser" has been added to the Projects preference pane. When checked, the currently open file will be revealed in the project's file browser. By default, the option is not checked and thus the behavior is as it was before.
This fixes regression caused by 1de5d90475788143655a60fdbff654139fec3cb4 that divider height and default compression priority disallowed expected height.
We use to pass nil to NSMenuItem initWithTitle: when clicking the SCMFolders in SCM Status (see commit e5841fe); however, we will *probably* never encounter this now. But it might be useful, if custom data sources are implemented for the file browser in the future.
Also removed the static SafeObjectAtIndex mehtod in OakTabBarView
This is defined in OakTabBarView as a static method, but it could be useful elsewhere.
This fixed problem when closing TM2 with zoomed window, then unzooming window after restart caused invalid window placement.
Previously when constructing a scm URL from a path, if scm was not enabled we returned a file URL. This could result in some unexpected behavior. For instance, when a directory was selected in the file browser, activating "SCM Status" would just open the untracked directory. This patch, insteads, adds a query to the scm URL that can be parsed to determine how to handle the scm status request later on.
Accessibility visual bounds for a range of a single softline should always be also visually restricted to the softline. This is in order to be consistent with implementation in Apple's apps (e.g. TextEdit).
Fixes #1149. VoiceOver expects AXLineForIndex and AXRangeForLine to be consistent with the movement by line using arrow up/down. That means it expects "line" to mean softline. VoiceOver also distinguishes commands to move by: * paragraph (hardline): VO-Shift-PgUp/PgDown * line (softline): VO-up/down These are available when interacting with the text area (VO-Shift-down). This commit therefore fixes the AXLineForIndex and AXRangeForLine to make "line" mean "softline" instead of "hardline" as was the case until now.
Now links in text (e.g. links to RFCs after installing the Hyperlink Helper bundle) are announced as such with VoiceOver and it is possible to search for them with VO-Cmd-L. TODO: * launching links with VO-Space is not supported yet, but Enter (Fn-Return) does the same thing and is even more reliable. * link URL is not supported, so it is not possible to learn the URL with VO-Shift-U.
This is a document with information I found most useful as a new contributor to TextMate - basic stuff a new contributor is likely to get in contact with. It's of course incomplete, sparse, can be not well worded and even contain mistakes. But someone had to make the first shot :-)
This should allow Quick Look generators to function when they target a more specific UTI. Discussed in #1141 and #1168.
TextMate's, not TextMates.
This setting allows changing which invisibles are shown and what glyph is used for them. Invisibles are '\t', '\n', and ' ', to turn one off, add ~[\t \n] to the settings string. To set the glyph used for the invisible, add [\t \n][glyph_to_use].
This allow configuring which characters should be used to render tabs, spaces, and newlines (when “show invisibles” is enabled).
Works around a bug where icons are not inherited from the UTI definitions.
VoiceOver can announce text formatting, such as bold font, italics, underline, font, etc., as well as whether text is misspelled. For this, it needs the AXAttributedStringForRange attribute supported. This commit does exactly that. Testing can be done in this way (VO stands for Ctrl-Option): * first interact with the text (VO-Shift-down arrow when standing on the text element) * to announce text attributes for character after cursor, press VO-T * to seek for next: * misspelled text: VO-Cmd-E * color change: VO-Cmd-K * underlined text: VO-Cmd-U * many more (see VO-H-H, "Find", close help with Esc) * to seek for previous *: just add Shift to the shortcut Some attributes remain to be supported (full list of attributes is available at: https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/Protocols/NSAccessibility_Protocol/Reference/Reference.html#//apple_ref/doc/uid/20000945-SW53). The misspelled text VoiceOver support can be used nicely with TextMate's spelling support: 1. the user finds next mistake with VO-Cmd-E, hears the misspelled word, perhaps reads it on a braille display 2. the user then presses Cmd-; to show the spelling menu for that word and chooses the desired resolution (apply suggested correction etc.) 3. go back to step 1. :-)
This removes the need to create and manage a separate menu item as a placeholder for the title of the color swatch in the file browser action menu.
Otherwise just select next spelling error on Check Spelling, which is called by spelling panel as well.
We invalidate the entire buffer since the word can appear in multiple locations. This could be optimized to only invalidate misspelled instances of the ignored or learned word. Likewise, we redraw entire buffer since the refresh macro is not able to handle changes in spelling meta data and calculate minimal refresh region.
Also add key equivalents to spell popup menu.
Now using Edit -> Spelling -> Check Spelling selects next spelling error or one at caret if it was not yet selected, then shows context menu with correction suggestions. This makes checking spelling as easy as tapping Cmd+; Closes #1103
UTIs are taken from both the Apple supplied list and newly created for those that didn't exist. For those languages where no clear 'owner' existed to provide the reverse-DNS notation we use a com.macromates.* stand-in.
The behavior is based on Safari where last visible tab is swapped with the selected tab, if selected tab itself would not be visible. Commit edited by Allan Odgaard, original version used document icons in overflow menu and would make the effective last tab sticky. Closes #1060
Closes #1062
@executable_path is the originally-executed program, whereas @loader_path is the program that caused the load to occur (e.g. a Quick Look generator). @rpath can be changed at link time — a QL generator can specify a value that points to the enclosing app bundle’s Frameworks directory.
The fallback encoding is taken from .tm_properties (attr.unknown-encoding).
When this setting is enabled it will render the file browser with the source list style, that is, the same style as the sidebar in Finder. To enable run: defaults write com.macromates.TextMate.preview fileBrowserStyle SourceList
Shrinking the file browser width so that the folder drop-down text is compressed would cause the layout to break if the width was then increased.
Previously wasn't possible to stop a search in progress (even when closing the Find window).
This is useful when including a grammar and its injections needs to be applied.
This allows overriding “native” rules via injecting. This commit drops support for using ‘.’ as (injection) scope selector to match everywhere. Instead use ‘*’.
Added `scopeAsString` method to retrieve current scope as NSString
Leiningen is a build automation and dependency management tool mainly used for Clojure projects. https://github.com/technomancy/leiningen
If this is on, then VoiceOver reads the name of the new tab being switched to, enabling easier navigation between open tabs.
Make available to accessibility the following information that file browser displays visual indication for: * file type (whether the file is a file, folder etc.) * SCM status (whether the file is modified etc.) * close button (whether the file is open) Also, while we are at it, make available to accessibility the tooltip, filename and URL.
This notifies the user the choice is exclusive to only one button. Also including these buttons in an AXRadioGroup adds positional indication to the radio buttons (like "2 of 3") which gives sense of how many values there are to choose from, where in the list of those the user currently is, and, if there are more sequential AXRadioGroups (which is not the case here), it distinguishes in which one the user is making a choice.
The content scope is the portion of the scope created while parsing the document content, unlike scope attributes, document, project, SCM, and dynamic scopes (appended to the content scope).
This treats the label as a small size control.
Before labelFontSize was used for all controls, as the label size should match the control size we need to have different functions for each control size.
Closes #131
This will work properly with very long lines and soft wrap Fixes #869.
This enables VoiceOver user to see the document view as a single element and interact with it (i.e. inspect its subelements) only when needed by using the VO-Shift-down shortcut (and stop interacting with it using VO-Shift-up shortcut). This makes the element structure more hierarchical where at the top level are only major user interface components, so that it's easier for orientation. It also prevents unrelated UI elements to be sequential as VoiceOver by default orders elements by the visual order (top-down, left-right) rather then the order in the AXChildren array. For example in this case, the bottom status bar of the document window gets separated from the bottom toolbar of the file browser, unlike the situation before grouping when both bars were adjacent to the VoiceOver user.
This fixes semantics of the button and thus also its accessibility. The macro recording button represents state - more specifically a boolean state, so it has to be a NSToggleButton (or its specialization). Then the button is presented to the VoiceOver user as an AXCheckbox - that is a checkbox with on and off value - which is exactly what the button's function is. Examples of this in system apps is e.g. the "Play" button in QuickTime Player, which is also an AXCheckbox ("Pause" is then simply an unchecked "Play" checkbox).
VoiceOver reads an AXValue for a pop-up button - that is the selected item. But button's title does not set an AXValue, as it probably is not a menu item. So change the code set to the title by setting a single menu item with that title. This fixes accessibility of the pop-up when accessing its value before it is first popped up. It makes the code consistent with setGrammarName: which works fine (that's how I discovered how to fix it).
When enabled the height of the document is increased by the height of the view port, which means the last lines of the document are not anchored to the bottom of the view port but can e.g. be centered. Closes #513.
Before using the 'Open…' dialog caused the discreet graphics chip to be enabled until TextMate exited. Setting this flag tells the OS that we want and are able to use the integrated graphics to conserve the battery. Detailed in Apple Technical Q&A QA1734: http://developer.apple.com/library/mac/#qa/qa1734/
Previously this appeared correct because once you clicked the minimum height of the pop-up menu set it to the correct height. Corrects an issue noted by @fatiotus in #728.
- Set compression priorities to collapse fields in a desirable order. - Increase default width of selection string to fit 8888:88 - Set grammar popup to the width of the active grammar and give is sensible minimum/maximum widths. - Set a maximum width for the tab size menu.
This is required now that they are set as opaque.
This is to match the minimum allowed size for the sidebar header when the tabs above document is enabled, also matches the height of the forthcoming tab redesign.
Added .less files to the OakAppKit .plist bindings file as another grid icon, to go along with the existing .css, .sass and .scss definitions. Signed-off-by: Bob Rockefeller <bob@bobrockefeller.com>
This code is public domain. Closes #166.
Since a document cannot send notifications, this will allow the SymbolChooser to monitor and respond to notifications from the DocumentView.
This would mainly happen when creating new windows with a file browser. Described at: http://stackoverflow.com/questions/5812593/nswindow-textured-gradient-fill-weirdness http://stackoverflow.com/questions/7795505/nswindow-textured-background-with-nstextfield/11482772#11482772
NSShadowAttributeName has no effect when using CTFrame. Use CGContextSetShadowWithColor instead.
This change adds new option for showing tab bar only above document, so the file browser header lines up with tab bar. File browser header height reduced by 1 pixel to match tab bar height. It also draws optional top divider when in same line as tab bar
Any file should be able to be opened within TextMate, so Option-DblClick will always do that. I first noticed this with .xib files. Because of the order of the if statements, opening an alias to a package or binary file (or .xib) would not have the previous if statements applied to it.
For aesthetic reasons the focus ring is disabled as there is no other control that can be active, however this is not the case with full keyboard access enabled as you can tab through the scope bar as well.
- Remove focus ring from search field as there is no second target. - Set top and bottom border widths for the textured window. - Remove miniaturize and zoom buttons for lack of utility. - Match name of window to menu command. - Various color and spacing tweaks.
Font name and font size was being used in the cache key as a way to avoid having to do cache invalidation. This comes at a price of a 3X slow down. Instead clear the cache when font size/name changes. Excessive font name/size switching should be deterred IMO, why not with slowdowns? so no real downside. This does not affect themes setting font name/size, as they are handled by another mechanism.
- The shading is a combination of the scope bar and textured button used in Lion/Mountain Lion. - Add an inactive state. - Increase click area of the forward/back buttons while decreasing the image size. - Switch popup menu cell to NSBackgroundStyleLight, previously the text would go to gray when inactive this prevents that though it does lose the drop shadow. - Various tweaks to alignment and spacing.
Issues remaining: * VoiceOver for some reason cannot track keyboard focus (i.e. moving down the list with just down arrow does not move VoiceOver cursor). User has to move the VO cursor instead using VO-down (and keyboard cursor follows in this case) * the pasteboard window isn't focused automatically for VoiceOver, user has to switch manually to it using VO-F2-F2
When you control-click the empty part of the file browser and select “Show in Finder” a Finder window will open showing the currently selected folder. You can go about this other ways, but I find that this feature complements the already existing "New Folder" menu item in the no-items-selected context menu of the file browser. This patch is public domain.
This reveals the current document in the file browser, by expanding directories to reach it, rather than changing the root directory of the browser.
Do some checks to see if there is more to parse on the following line, before invoking the (layout) callback.
Zoom is an OS X accessibility feature that lets sighted visually impaired users magnify screen content. This commit notifies Zoom of changes of TextMate’s caret position on screen so that Zoom can automatically follow the caret when the user moves it.
This commit adds support for most common accessibility methods/attributes to the OakTextView component. In user's language, VoiceOver users (i.e. blind and visually impaired users) can now use TextMate to read and write text. A few less used accessibility attributes remain to be supported - especially AttributedStringForRange and StyleRangeForIndex which should allow blind users to e.g. see and seek for spelling errors in text.
Backwards compatibility for commands that expect the variable to always exist or match the NO state, this matches the behavior of 1.x.
If changes are limited to visible rows, we only reload these.
This is when generating HTML for the release notes, manual, and, where we actually need this, list of contributions. Long-term we should probably switch to template tags as we are effectively adding code to the (otherwise declarative) build graph, which means we don’t have any way to tell if the generated HTML is up-to-date or not (as that would require analyzing the embedded ruby code).
Disabling this is achieved by setting `fileBrowserDocumentStatus` to `false` in `.tm_properties`. Disabling it should remove potential delays after opening, closing, and saving files when file browser is showing a lot of files. It is meant as a temporary workaround until the performance issues are addressed.
A user may read the text and use GitHub’s download button, thinking this is what the README refers to.
Re-layout input & output fields, so they don't enlarge whole drawer too much.
Previously, if no themes were active, the gutter colors would not be set. This would, effectively, give you random gutter colors on TextMate startup. (or, sometimes, a completely transparent gutter).
This includes bundle changes.
Fixes #445.
Fixes issue #77.
You can now use CTRL+S and CTRL+SHIFT+S to jump forwards/backwards in the incremental search results
A courtesy to anyone with images and illustrator files in their project!
1. Removed the alpha channels from all images. 2. Deleted unnecessary double images. (@sorbits: You might want to rename them to more accurately display what they do.) 3. Slight adjustments to improve the visibility of the bookmark icons at lower font sizes.
The following four new keys have been added: - gutterIconsHover - gutterIconsPressed - gutterSelectionIconsHover - gutterSelectionIconsPressed
__attribute__((format(...))) was added to NSAlert's class-based initializer in 10.7, and due to using string objects instead of literals as informative text, Clang is unable to guarantee the safety of the formatter, and, as such, issues a warning.
* Note: Column delimiter is back to four spaces due to XML/XSL not allowing control characters
Implemented proper alignment of the icons with the line number font.
* Changed the Subversion status command to output XML * Updated the status parsing to handle new XML output
This can be used together with `TM_SCM_BRANCH` to customize `windowTitle`.
Variables customizing `windowTitle` such as `$TM_SCM_BRANCH` can change while TM is inactive, while user is working in command line or different app. So it is better to refresh `windowTitle` once we get back to TM.
Unfortunately a printf precision specifier (‘%.*s’) can not come with a width specifier so we have to cast to int. The width specifier ‘t’ is used for ptrdiff_t. The int → NSInteger change fixed a bug with popup menu positioning, but there was no associated warning or error. It's possible there are more such bugs that we haven't found yet!
- Property using superclass ivar - Multiple methods matching selector
As we are no longer using Carbon functions to set menu key equivalents, this means that bundle menu items which have the same key equivalents as main menu items will unfortunately not display their key equivalents in the menu.
Only attempt to show the item in Finder if it is a file
After dragging the HTML Output window down below the bottom of the main window it cannot be dragged back and negative height of HTML Output is saved to file.
* Rewrote the Subversion SCM driver to use the svn executable * Badges work just like Mercurial * TM_SCM_BRANCH is set to the full repository URL for the working copy See issue #273.
New theme setting: gutterSelectionForeground
This closes issue #5.
New theme setting: gutterSelectionBackground
The left and right borders are no longer visible, so the results are flush with the edges of the find window.
As all the icons have been remade some of them should look better on non-retina also. This closes issue #42.
Theme setting keys gutterForeground, gutterBackground, and gutterDivider
This allows the border to appear properly when scrolling (with a multitouch device) bounces past the end of the content.
Previously disabled items could not be selected, and hence not be re-enabled.
On a ^Q text reformat, trailing whitespaces were not removed. Typically whitespace is typically considered undesirable.
This applies to scoped font size settings and should be faster than the previous std::string based approach.
This should be faster (and probably more precise) than the previous std::string based color manipulations.
This is using NSAttributedString’s NSTextTableBlocks: * Font is determined from current menu rather than hardcoded * Fixed: Invalid font size on bundle-item popup * Fixed: Both tab triggers and key equivalents can co exists on single menu item * No relayout calculations are needed after menu update (this is done automatically by NSLayoutManager when using NSTextTables) * Uses 10.5 compatible API
Do not specify selected index explicitely, popup menu item with NSOnState gets selected by default.
fixup! Draw tab triggers and key equivalents in menu Fix memory leak
The old techniques used to set key equivalents no longer work. Unfortunately, this technique is only a workaround and is not pixel-for-pixel identical due to the way NSMenuItem lays itself out when rendering a key equivalent; but I think it's the best that can be done for now.
This allows the project to build with the system default framework/include/library paths.
Using this allows other software to check whether configure was successful. This patch is public domain.
git commit fails when user.name and user.email aren't set. Unfortunately using git commit --author='Test Test <test@example.com>' doesn't work. This could happen in environments where pristine users are used to build software. This patch is public domain.
Only one octothorpe now.
It's a good looking editor, let's see a picture.
"Full Screen Menu Item" template from Object Library in Interface Builder, with key binding removed
In Interface Builder: Attributes Inspector -> Full Screen -> Primary Window
When the last tab is closed the window will be kept open if the file browser is shown. It will close the existing document and replace it with a scratch document.
If another user (on the same system) builds TextMate then he blocks everyone else, as other users would be unable to overwrite /tmp/dummy.
This is mainly for calling ‘mate «directory»’. Reference http://lists.macromates.com/textmate/2012-August/035164.html
Brings TM2 in line with the promises in http://manual.macromates.com/en/using_textmate_from_terminal.html Could probably be written nicer, I just don't get C++!
Example: previously it was not possible to open a URL like txmt://open?url=file:///Library/Keyboard%20Layouts/
This enables SCM badges for disk images. The check is done using the new (10.7) kCFURLVolumeIsLocalKey.
GlimmerBlocker (http://GlimmerBlocker.org) and other proxies may intercept the web data and replace the HTTP/1.0 response with a HTTP/1.1 response. Modified test to accept either.
https://github.com/mxcl/homebrew/commit/ff13af6fb37b378c9edb3a91fe3d6016c36661b5
This way it can be installed anywhere as long as the C compiler can find it.
In order to build from TextMate you also need to set the PATH variable.
Markdown syntax is not case sensitive for hyperlink tags, so use different tags for ninja, the build system, and Ninja, the TextMate Bundle.