If there are multiple (discontinuous) selections then this action will drop the last one.
If there are multiple carets (with no selections) then this action will drop all but the first caret.
This makes it possible to combine the “Use Selection for Find / Replace” with a non-simple find action (e.g. “Replace All”).
If any find options are set (case sensitive, regular expression, etc.) then these will trump the options set for the entry on the find clipboard.
Since we are doing a literal (byte-by-byte) subset match we need to have the filter string use the same unicode normalization form as the items it is matched against.
For favorites and the file chooser, the items are file system names, which default to the decomposed form.
Ideally the filtering algorithm would know about diacritics, but in practice the current solution should work for most actual scenarios, and is much simpler (thus faster).
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.
When command-clicking an existing selection we remove the selection and insert a single caret.
When double/triple-clicking we remove existing carets/selections in the range that gets selected.
This is instead of adding “copy” to the base name.
This is useful when you use a previous (dated) document as template for a new one, e.g. an invoice, meeting minutes, or similar.
We only add this workaround to tab item views and rollover buttons, but the issue applies to all subviews that do not have their own context menu, but placed in a superview which does.
Closestextmate/bugs#11
This is only when the command input requested is “selection”. In theory it probably should also do this when input is character, word, or line, but in this case, we can end up with overlapping input ranges.