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
I then run my extension and open a file in the editor window. I then close that file's tab.
I then sit and wait and do nothing.
It is taking upwards of between 60 and 90 seconds before the console log message appears with the result. What is being displayed is correct but the delay of over a minute makes it unusable.
Is there a solution to this or is this a defect?
I am aware of the reference in the doc to this comment: Note 1: There is no guarantee that this event fires when an editor tab is closed, use the onDidChangeVisibleTextEditors-event to know when editors change.
However - that then begs the question as to what then is the purpose of OnDidCloseTextDocument if it doesn't do what it says on the tin! ??? It works but takes 60+ seconds to respond.
Whereas the suggestion of using onDidChangeVisbibleTextEditors doesn't provide any useful info telling you exactly what file/tab was closed. I don't see that it comes even close to what OnDidCloseTextDocument is accomplishing albeit taking an age to actually notify the event..
I am also aware of this similar reported problem. #102737
How it can be possibly considered to be working as designed seems very strange as in its current form it is unusable.
I close an editor tab of a file that has been editted. I would expect to be notified immediately that it is closed. I do not see that as being unreasonable when the event is titled OnDidCloseTextDocument.
If this has no plan to be addressed, what is the correct method of determining that a tab of a file that has been changed is now closed as OnDidChangeVisibileTextEditors does not provide that capability.
The text was updated successfully, but these errors were encountered:
If this has no plan to be addressed, what is the correct method of determining that a tab of a file that has been changed is now closed as OnDidChangeVisibileTextEditors does not provide that capability.
Currently there is no representation for editor tabs (aka the open editor model) in the API. You will find a tracking issue for what searching of "open editors api"
A number of people appear to have reported this shortcoming. Is it planned to provide this functionality to Extensions? The event is titled - OnDidCloseTextDocument - and it isn;'t.
It might be working as 'expected' but isn't working as most folk require.
I have a VSCode extension and I need to know when a file is saved and closed so I Can take a follow on action.
Steps to Reproduce:
As a simple test, I have this defined in my extension.ts
I then run my extension and open a file in the editor window. I then close that file's tab.
I then sit and wait and do nothing.
It is taking upwards of between 60 and 90 seconds before the console log message appears with the result. What is being displayed is correct but the delay of over a minute makes it unusable.
Is there a solution to this or is this a defect?
I am aware of the reference in the doc to this comment:
Note 1: There is no guarantee that this event fires when an editor tab is closed, use the onDidChangeVisibleTextEditors-event to know when editors change.
However - that then begs the question as to what then is the purpose of
OnDidCloseTextDocument
if it doesn't do what it says on the tin! ??? It works but takes 60+ seconds to respond.Whereas the suggestion of using
onDidChangeVisbibleTextEditors
doesn't provide any useful info telling you exactly what file/tab was closed. I don't see that it comes even close to what OnDidCloseTextDocument is accomplishing albeit taking an age to actually notify the event..I am also aware of this similar reported problem.
#102737
How it can be possibly considered to be working as designed seems very strange as in its current form it is unusable.
I close an editor tab of a file that has been editted. I would expect to be notified immediately that it is closed. I do not see that as being unreasonable when the event is titled OnDidCloseTextDocument.
If this has no plan to be addressed, what is the correct method of determining that a tab of a file that has been changed is now closed as OnDidChangeVisibileTextEditors does not provide that capability.
The text was updated successfully, but these errors were encountered: