Inserts the selected completion into the text at the appropriate location.
- macOS 10.3+
The text to insert, including the matched partial word and its potential completion.
The range of characters of the matched partial word to be completed.
The direction of movement. For possible values see the
NSTextConstants section. This value allows subclasses to distinguish between canceling completion and selection by arrow keys, by return, by tab, or by other means such as clicking.
falsewhile the user navigates through the potential text completions,
truewhen a completion is definitively selected or cancelled and the original value is reinserted.
This method has two effects, text substitution and changing of the selection:
It replaces the text between
charand the current insertion point with
falseit changes the selection to be the last n characters of
wordwhere n is equal to
char, that is, the potential completion.
trueit makes the selection empty and puts the insertion point just after