---
title: selections
framework: XcodeKit
role: symbol
role_heading: Instance Property
platforms: [macOS 10.12+]
path: xcodekit/xcsourcetextbuffer/selections
---

# selections

The text selections in the buffer.

## Declaration

```swift
var selections: NSMutableArray { get }
```

## Discussion

Discussion An empty range represents an insertion point. Modifying the lines of text in the buffer automatically updates the selections to match.

## See Also

### Editing Source Text

- [lines](xcodekit/xcsourcetextbuffer/lines.md)
