Add validation in LspCommand::to_lsp
+ check for inverted ranges (#22731)
#22690 logged errors and flipped the range in this case. Instead it brings more visibility to the issue to return errors. Release Notes: - N/A
This commit is contained in:
parent
1c223d8940
commit
141393232e
6 changed files with 134 additions and 162 deletions
|
@ -1134,7 +1134,7 @@ impl RandomizedTest for ProjectCollaborationTest {
|
|||
let end = PointUtf16::new(end_row, end_column);
|
||||
let range = if start > end { end..start } else { start..end };
|
||||
highlights.push(lsp::DocumentHighlight {
|
||||
range: range_to_lsp(range.clone()),
|
||||
range: range_to_lsp(range.clone()).unwrap(),
|
||||
kind: Some(lsp::DocumentHighlightKind::READ),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue