File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -387,15 +387,23 @@ void linting_lsp_server_handler::handle_text_document_did_close_notification(
387
387
// Ignore invalid notification.
388
388
return ;
389
389
}
390
- std::string path = parse_file_from_lsp_uri (uri);
390
+ this ->handle_text_document_did_close_notification (
391
+ lsp_text_document_did_close_notification{
392
+ .uri = uri,
393
+ });
394
+ }
395
+
396
+ void linting_lsp_server_handler::handle_text_document_did_close_notification (
397
+ const lsp_text_document_did_close_notification& notification) {
398
+ std::string path = parse_file_from_lsp_uri (notification.uri );
391
399
if (path.empty ()) {
392
400
// TODO(strager): Report a warning.
393
401
QLJS_UNIMPLEMENTED ();
394
402
}
395
403
396
404
this ->config_loader_ .unwatch_file (path);
397
405
this ->config_fs_ .close_document (path);
398
- this ->documents_ .erase (string8 (uri));
406
+ this ->documents_ .erase (string8 (notification. uri ));
399
407
// TODO(strager): Signal to configuration_loader and
400
408
// change_detecting_filesystem_* that we no longer need to track changes to
401
409
// this .js document's config file.
Original file line number Diff line number Diff line change @@ -160,8 +160,14 @@ class linting_lsp_server_handler final : public lsp_endpoint_handler {
160
160
void handle_initialized_notification ();
161
161
void handle_text_document_did_change_notification (
162
162
::simdjson::ondemand::object& request);
163
+
164
+ struct lsp_text_document_did_close_notification {
165
+ string8_view uri;
166
+ };
163
167
void handle_text_document_did_close_notification (
164
168
::simdjson::ondemand::object& request);
169
+ void handle_text_document_did_close_notification (
170
+ const lsp_text_document_did_close_notification& notification);
165
171
166
172
struct lsp_text_document_did_open_notification {
167
173
std::string_view language_id;
You can’t perform that action at this time.
0 commit comments