Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Preserve cursor more accurately #8

Closed
sindresorhus opened this issue Aug 2, 2014 · 4 comments · Fixed by #72
Closed

Preserve cursor more accurately #8

sindresorhus opened this issue Aug 2, 2014 · 4 comments · Fixed by #72
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted

Comments

@sindresorhus
Copy link
Owner

sindresorhus commented Aug 2, 2014

Issuehunt badges

Use the Autoprefixer source map to map the cursor back to its original position.


IssueHunt Summary

jdiogopeixoto jdiogopeixoto has been rewarded.

Backers (Total: $40.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@sindresorhus sindresorhus changed the title Use setTextViaDiff when it's exposed in the editor Preserve cursor more accurately Aug 2, 2014
@IssueHuntBot
Copy link

@IssueHunt has funded $40.00 to this issue.


@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 10, 2019
@jdiogopeixoto
Copy link
Contributor

@sindresorhus I was looking into this and I removed the following line to check the default behaviour on Atom (v1.41.0).

editor.setCursorBufferPosition(cursorPosition);

What happens can be seen here. The cursor is on line 11 before saving and on line 13 after saving, remaining on the line with display: flex.

I think this is the correct behaviour because if I am writing in the file and saving it while writing, keeping the cursor in the same line that I was typing is helpful. Does this make sense?

@sindresorhus
Copy link
Owner Author

I guess Atom improved their diffing too. This was not as smooth before and the caret would jump around.

@issuehunt-oss
Copy link

issuehunt-oss bot commented Feb 13, 2020

@sindresorhus has rewarded $36.00 to @jdiogopeixoto. See it on IssueHunt

  • 💰 Total deposit: $40.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $4.00

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Feb 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants