NSTextView standard find panel: managing smart quotes in a search

66 Views Asked by At

In a NSTextView, the performFindPanelAction: method displays a find panel. The trouble occurs when the smart quotes automatic substitution is enabled on the NSTextView. When typing a single or double quote in the find text field, the smart quote substitution is enabled. So that the find panel cannot detect any occurence of a quote in the text.

For example, let's type he's in the NSTextView (or subclass) and it will be replaced by he’s. Then open the find panel (CMD+F) and type he's. No replacement of the single quote with a smart one occurs in the Find panel. So that the corresponding string is not found in the NSTextView.

Is there a way to enable automatic smart quotes in the standard find panel, or is it necessary to create a custom find panel (or disable smart quotes substitution in the NSTextView) to manage that?

0

There are 0 best solutions below