Skip to content
This repository has been archived by the owner on Aug 14, 2022. It is now read-only.

For lineNumber use getCursorBufferPosition() #68

Closed
wants to merge 1 commit into from

Conversation

jacoblchapman
Copy link
Contributor

I have problems when I use softwrap for editing a tex file, this change seems to fix the problem, at least on OSX with Skim.

When using getCursorScreenPosition() with softwrap the line number includes wrapped lines and the location in the document is incorrect. Instead use getCursorBufferPosition() which does not count wrapped lines.
For Explanation See https://atom.io/docs/api/v0.187.0/TextEditor#buffer-vs-screen-coordinates

I have problems when I use softwrap for editing this change seems to fix the problem, at least on OSX with Skim.

When using getCursorScreenPosition() with softwrap the line number is incorrect and the location in the document is incorrect. Instead use getCursorBufferPosition() which does not count wrapped lines.
For Explanation See https://atom.io/docs/api/v0.187.0/TextEditor#buffer-vs-screen-coordinates
@thomasjo thomasjo closed this in c934ee2 Mar 17, 2015
@thomasjo
Copy link
Owner

Thanks for fixing this! Will 🚢 a new version shortly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants