Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: restore selections *after* the file save #397

Merged
merged 3 commits into from
Feb 8, 2025

Conversation

SunsetTechuila
Copy link
Member

Please fill in this template.

  • Use a meaningful title for the pull request.
  • Use meaningful commit messages.
  • Run tsc w/o errors (same as npm run build).
  • Run npm run lint w/o errors.

fixes #396

@SunsetTechuila
Copy link
Member Author

the problem with the #372 is that it doesn't pause the event loop to apply changes, which works only with autosave enabled

and #386 doesn't fix any "race condition", it just gives more time to re-save the file

@SunsetTechuila SunsetTechuila merged commit 4c8b3a0 into main Feb 8, 2025
3 checks passed
@SunsetTechuila SunsetTechuila deleted the proper-newline-fix branch February 8, 2025 15:16
@@ -64,6 +65,11 @@ export default class DocumentWatcher {

subscriptions.push(
workspace.onDidSaveTextDocument(doc => {
const activeEditor = window.activeTextEditor
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is technically possible that it can be changed during saving, but this is very unlikely

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.

Changes are applied to the file after manual saving when insert_final_newline is true
1 participant