simonbs / Runestone

📝 Performant plain text editor for iOS with syntax highlighting, line numbers, invisible characters and much more.
MIT License
2.62k stars 145 forks source link

Allow TextLocation to be created #372

Closed migueldeicaza closed 2 months ago

migueldeicaza commented 2 months ago

There is currently no way of creating a TextLocation from a row, column. Even if that seems to have been the desire from a previous PR:

https://github.com/simonbs/Runestone/pull/138

This allows me to create TextLocations, which in turn let me gets offsets, which in turn allow me to get screen coordinates from a given position.

simonbs commented 2 months ago

@migueldeicaza Makes sense to me. I'm happy to merge this once the SwiftLint warning is addressed. I attempted fixing it but it seems that I don't have permission to push to your branch.

migueldeicaza commented 2 months ago

Thank you Simon.

I think I fixed the issue; I am not sure why this time it did not let you push to my branch. Apologies for that.