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 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.
With NSTextInputClient conformance this feature works fairly well, though we currently do not pass events (that we have an action for) to the current input context, which e.g. means that arrow left/right cannot be used to move through the variations.
For example with the following command we get an encoding dialog that allows us to cancel opening of the document:
echo Æblegrød|iconv -f utf-8 -t mac|mate -w
We now show two lines per item: the name of the item and the location on second line.
For settings we show the (literal) value of the item next to its name (ideally user could click the item to toggle between literal and effective value).
Selecting settings items (from properties files) will go to the proper line in the properties file.
Previously we would rely on the NSTextField cell’s line break mode, but this isn’t used when the object value is an attributed string, which it might become when the cell is selected.
We now give the user half a year before TextMate expires and only remind them once every week about TextMate being old, and now with a “Check for Updates” button in the dialog.
There are some problems with the auto-calculated key view loop:
1. Does the wrong thing when there are pending auto-layout changes.
2. Adds NSTableCellView children to the key view loop.
3. Adds views which are set to refuse first responder, which will break the loop if such view is the last one.
Ranking has also been simplified in the file chooser: by default we match against the full path but prefer matches that only touch the base name.
The current document is placed last when there is no filter string (where we LRU sort) but once there is a filter string, we do not give it special treatment.
The favorites (recent projects) chooser now has a visible remove button to remove recent items or favorites.
Accessibility has regressed as we no longer post a notification when the table view selection changes.