---
title: rangeForUserCompletion
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextview/rangeforusercompletion
---

# rangeForUserCompletion

The partial range from the most recent beginning of a word up to the insertion point.

## Declaration

```swift
var rangeForUserCompletion: NSRange { get }
```

## Discussion

Discussion This value is intended to be used for the range argument in the text completion methods such as completions(forPartialWordRange:indexOfSelectedItem:).

## See Also

### Performing text completion

- [complete(_:)](appkit/nstextview/complete(_:).md)
- [completions(forPartialWordRange:indexOfSelectedItem:)](appkit/nstextview/completions(forpartialwordrange:indexofselecteditem:).md)
- [insertCompletion(_:forPartialWordRange:movement:isFinal:)](appkit/nstextview/insertcompletion(_:forpartialwordrange:movement:isfinal:).md)
