Skip to content

Conversation

@3ru
Copy link
Contributor

@3ru 3ru commented Mar 28, 2022

[Fixes #] No issues have been created. (If it is required, I will create it.)

Motivation

If the cursor position is misaligned after code reformatting, it is difficult to see where one's cursor has been sent. In fact, the cursor position is comfortably maintained in regular code editors (VSCode, JetBrains, etc.), even when running code reformatting.

I have also seen several people on youtube asking for this problem to be fixed.

Changes

Fixed by obtaining the scroll position before code reformatting and scrolling to that position after reformatting.

Demo

Before After
ab88bb7deb6ce7c825f5cf04187e0659.mp4
5fe0cf3a7485c361de30128216b05982.mp4

Checklist

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

Ref

@welcome
Copy link

welcome bot commented Mar 28, 2022

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

@raclim raclim merged commit 87f8170 into processing:develop Mar 9, 2023
@3ru 3ru deleted the fix/scroll-position branch March 12, 2023 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants