XCodeKit Extension Cursor Position

I am creating an Xcode 8 extension for myself with the new XCodeKit. I get text with XCSourceTextBufferand range with XCSourceTextRange. In doing so, I have the start and end position of the selected text, and I can add text to the beginning of the line. The problem is that I can’t catch the last position of my cursor, I want to check the position of the cursor so that I can paste the text there and not where my line starts. Does anyone know how to handle this?

+4
source share

Source: https://habr.com/ru/post/1659069/


All Articles