-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
make sure to sync views when applying edits to unfocused views #9173
Conversation
I can also confirm it fixes a bug similar to the one in the discussion but with renaming.where you open a document (a) then create a split and go to near the end of the file there, then change to a different document(b) that has a function you can rename that is referenced in file (a), then go to file (a) in the other split find the reference to the function you are going to rename and delete from the line after there to the end of the file, switch back to the other split with file (b) and rename the function, before this pr helix crashes there |
this fixes bugs when applying workspace edits with lsp to a view where the most recent selection range is outside the current document or when adding a newline/formatting during write all in the same situation
I moved it to editor, needed to change some things to appease the borrow checker stuff |
this fixes bugs when applying workspace edits with lsp to a view where the most recent selection range is outside the current document or when adding a newline/formatting during write all in the same situation
fixes #9157 and fixes #6752
I decided to sync the view when getting the id instead of calling sync when applying the transaction. I am not sure if I put the utility function in the correct place, I did have to take the tree instead of the editor because rust was giving me error for passing the editor within the closure in write-all, which I wasnt able to figure out
(I think we might be able to use this function in reload-all as well, though it already properly handles this)