markohlebar / Import

Xcode extension for adding imports from anywhere in the code ☝️
MIT License
848 stars 40 forks source link

Fixed current position issue #24

Closed clementpadovani closed 7 years ago

clementpadovani commented 7 years ago

This fixes #22

However the issue persists with Xcode 8, however with this code I’m getting no issues with Xcode 9 beta 2.

markohlebar commented 7 years ago

Ahh I see! Okay I'll check it later today 👍 On Mon, 10 Jul 2017 at 12:55, Clement Padovani notifications@github.com wrote:

@ClementPadovani commented on this pull request.

In ImportExtension/AddImportOperation.swift https://github.com/markohlebar/Import/pull/24#discussion_r126389955:

@@ -120,9 +120,12 @@ class AddImportOperation { self.buffer.lines.insert(importString, at: line)

     //add a new selection. Bug fix for #7
  • let selectionPosition = XCSourceTextRange.init(start: XCSourceTextPosition.init(line: 0, column: 0), end: XCSourceTextPosition.init(line: 0, column: 0))

Sorry, I ment to say Xcode 8.3.x; after testing it on Xcode 8.3.3, I was having no issues.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/markohlebar/Import/pull/24#discussion_r126389955, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJFmw5TAFm0ITukoeuaB2c0tt62JLlLks5sMgMlgaJpZM4OSEFI .

markohlebar commented 7 years ago

Tested this on 8.3.3 and 9.0 beta 2, works as expected!