Skip to content

Commit

Permalink
fixup! check cancellation when walking navigation tree
Browse files Browse the repository at this point in the history
  • Loading branch information
nayeemrmn committed Feb 7, 2025
1 parent 97b730e commit 9df3db4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cli/lsp/language_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2188,11 +2188,15 @@ impl Inner {
code_lenses.extend(
code_lens::collect_test(&specifier, parsed_source, token).map_err(
|err| {
error!(
"Error getting test code lenses for \"{}\": {:#}",
&specifier, err
);
LspError::internal_error()
if token.is_cancelled() {
LspError::request_cancelled()
} else {
error!(
"Error getting test code lenses for \"{}\": {:#}",
&specifier, err
);
LspError::internal_error()
}
},
)?,
);
Expand Down

0 comments on commit 9df3db4

Please sign in to comment.