File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
src/PowerShellEditorServices.Protocol Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ public class TextDocumentPosition : TextDocumentIdentifier
80
80
/// <summary>
81
81
/// A parameter literal used in requests to pass a text document and a position inside that document.
82
82
/// </summary>
83
- public class TextDocumentPositionParams {
83
+ public class TextDocumentPositionParams
84
+ {
84
85
/// <summary>
85
86
/// The text document.
86
87
/// </summary>
@@ -115,8 +116,19 @@ public class DidOpenTextDocumentParams
115
116
public class DidCloseTextDocumentNotification
116
117
{
117
118
public static readonly
118
- EventType < TextDocumentIdentifier > Type =
119
- EventType < TextDocumentIdentifier > . Create ( "textDocument/didClose" ) ;
119
+ EventType < DidCloseTextDocumentParams > Type =
120
+ EventType < DidCloseTextDocumentParams > . Create ( "textDocument/didClose" ) ;
121
+ }
122
+
123
+ /// <summary>
124
+ /// The parameters sent in a close text document notification.
125
+ /// </summary>
126
+ public class DidCloseTextDocumentParams
127
+ {
128
+ /// <summary>
129
+ /// The document that was closed.
130
+ /// </summary>
131
+ public TextDocumentIdentifier TextDocument { get ; set ; }
120
132
}
121
133
122
134
public class DidSaveTextDocumentNotification
Original file line number Diff line number Diff line change @@ -503,11 +503,11 @@ protected Task HandleDidOpenTextDocumentNotification(
503
503
}
504
504
505
505
protected async Task HandleDidCloseTextDocumentNotification (
506
- TextDocumentIdentifier closeParams ,
506
+ DidCloseTextDocumentParams closeParams ,
507
507
EventContext eventContext )
508
508
{
509
509
// Find and close the file in the current session
510
- var fileToClose = editorSession . Workspace . GetFile ( closeParams . Uri ) ;
510
+ var fileToClose = editorSession . Workspace . GetFile ( closeParams . TextDocument . Uri ) ;
511
511
512
512
if ( fileToClose != null )
513
513
{
You can’t perform that action at this time.
0 commit comments