diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9be1039..eae4fe7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,11 +8,14 @@ on: branches: - '**' +env: + DEVELOPER_DIR: /Applications/Xcode_13.2.app/Contents/Developer + jobs: test: name: Test runs-on: macOS-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: swift test run: swift test diff --git a/Rearrange/NSTextRange+NSRange.swift b/Rearrange/NSTextRange+NSRange.swift index bfc7236..677d432 100644 --- a/Rearrange/NSTextRange+NSRange.swift +++ b/Rearrange/NSTextRange+NSRange.swift @@ -45,7 +45,7 @@ public extension NSTextRange { return nil } - guard let end = provider.location?(docLocation, offsetBy: range.max) else { + guard let end = provider.location?(start, offsetBy: range.length) else { return nil }