You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cursor position not maintained after returning TextEdit[] from provideDocumentFormattingEdits #755
I would have expected the cursor position to be maintained (as best it can in case it falls within a delete range) after applying a set of TextEdits returned by APIs such as provideDocumentFormattingEdits.
Instead, I am seeing the cursor remain at the same absolute offset relative to the beginning of the source in the final result, which results in moving the logical location in source text where the user was editing.
Can Code automatically handle this when it applies TextEdit[] objects? Or should extensions be adding their own logic to try and compensate for this?
I might not be able to, since we ended up using a pretty different approach to this. I'll close this for now and will reopen if I'm able to recreate an example of the problem.
Activity
alexdima commentedon Nov 30, 2015
Luke Hoban (@lukehoban) Can you please help me out with a specific before text, before selection and edit operations
lukehoban commentedon Nov 30, 2015
I might not be able to, since we ended up using a pretty different approach to this. I'll close this for now and will reopen if I'm able to recreate an example of the problem.