Effectively we would only test if the prefix of a search result was malformed UTF-8, if the search result itself or the suffix was malformed, no error would be shown.
Since it was one byte it would throw an exception if the last character on the line was a multi-byte sequence (as we’d create an NSString with malformed/truncated UTF-8).
This was previously done because the function wasn’t available until 10.7, but since that is (now) our deployment target, there is no need to wrap the call.
The auto-layout debug mechanisms report that our layout is ambiguous, for example if inserting ‘[self.window visualizeConstraints:_myConstraints]’ at the end of showWindow:.
Closes#1282
Rather than skip the field editor, regardless of which view it belongs to, we check if the first responder is the replace text field’s (current) field editor.
We can get to the next/previous node via the parent pointer, although it has worse time complexity, it’s not something we use in loops, so the extra bookkeeping is not worth it.
When searching for either CR or LF in a CRLF delimited file, we effectively match a partial newline and previously the excerpt’s BOL/EOL positions would not take that into account, so the match wasn’t guaranteed to be a subset of the excerpt.
Ideally the document reader should harmonize newlines so that the searcher only sees LF, though currently that is not the case.
The number appears after command has been held down for 0.2 seconds and is meant as a hint about being able to press ⌘1-n to jump to the n’th file with matches.
We no longer do any reloading of the outline view (on changes) and we have the item store the replacement string when a replacement has been done, so that it will continue to show the actual replacement done (after replacement string is changed).
This only served to disable the Replace All button, we now rely solely on the number of non-excluded and non-ignored results to control the enabled state of the button.
We now bind the enabled state of the “exclude result” checkbox to this property and only set it to YES for files that had replacements done, meaning that the checkboxes are available after replace for files that weren’t involved in the replacement.
When a group node is ignored then it report all its children as excluded regardless of their actual state. It is still possible to query the children for the real state.
We now use the control content font as this seems to be meant for content shown in tables. We use the standard size (of 12 points) for the headings and set the result rows to use 11 point.
The number of matches is shown with the label font as that is semantically a small font used for placing labels next to things.