refactor: rename variable

This commit is contained in:
Nikita Revenco 2024-12-23 13:43:10 +00:00
parent 6db63d4632
commit c7520c3550

View file

@ -1254,7 +1254,7 @@ pub fn compute_inlay_hints_for_all_views(editor: &mut Editor, jobs: &mut crate::
}
}
fn lsp_annotations_area(view: &View, doc: &Document) -> (usize, usize) {
fn lsp_annotations_line_range(view: &View, doc: &Document) -> (usize, usize) {
// Compute ~3 times the current view heigh, that way some scrolling
// will not show half the view with annoations half without while still being faster
// than computing all the hints for the full file
@ -1284,7 +1284,7 @@ fn compute_inlay_hints_for_view(
.language_servers_with_feature(LanguageServerFeature::InlayHints)
.next()?;
let (first_line, last_line) = lsp_annotations_area(view, doc);
let (first_line, last_line) = lsp_annotations_line_range(view, doc);
let new_doc_inlay_hints_id = DocumentInlayHintsId {
first_line,
@ -1433,7 +1433,7 @@ fn compute_color_swatches_for_view(
.language_servers_with_feature(LanguageServerFeature::ColorProvider)
.next()?;
let (first_line, last_line) = lsp_annotations_area(view, doc);
let (first_line, last_line) = lsp_annotations_line_range(view, doc);
let new_doc_color_swatches_id = ColorSwatchesId {
first_line,