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(
387387 // Ignore invalid notification.
388388 return ;
389389 }
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 );
391399 if (path.empty ()) {
392400 // TODO(strager): Report a warning.
393401 QLJS_UNIMPLEMENTED ();
394402 }
395403
396404 this ->config_loader_ .unwatch_file (path);
397405 this ->config_fs_ .close_document (path);
398- this ->documents_ .erase (string8 (uri));
406+ this ->documents_ .erase (string8 (notification. uri ));
399407 // TODO(strager): Signal to configuration_loader and
400408 // change_detecting_filesystem_* that we no longer need to track changes to
401409 // 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 {
160160 void handle_initialized_notification ();
161161 void handle_text_document_did_change_notification (
162162 ::simdjson::ondemand::object& request);
163+
164+ struct lsp_text_document_did_close_notification {
165+ string8_view uri;
166+ };
163167 void handle_text_document_did_close_notification (
164168 ::simdjson::ondemand::object& request);
169+ void handle_text_document_did_close_notification (
170+ const lsp_text_document_did_close_notification& notification);
165171
166172 struct lsp_text_document_did_open_notification {
167173 std::string_view language_id;
You can’t perform that action at this time.
0 commit comments