Skip to content

Commit

Permalink
refactor: rename function
Browse files Browse the repository at this point in the history
refactor: rename function
  • Loading branch information
NikitaRevenco committed Dec 25, 2024
1 parent db8ac50 commit 67552f6
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions helix-view/src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ impl DocumentColorSwatches {
pub fn empty_with_id(id: ColorSwatchesId) -> Self {
Self {
id,
color_swatches: Vec::new(),
color_swatches_padding: Vec::new(),
colors: Vec::new(),
color_swatches: vec![],
color_swatches_padding: vec![],
colors: vec![],
}
}
}
Expand Down Expand Up @@ -1439,7 +1439,7 @@ impl Document {
.sort_by_key(|diagnostic| (diagnostic.range, diagnostic.severity, diagnostic.provider));

// Update the inlay hint annotations' positions, helping ensure they are displayed in the proper place
let apply_inlay_hint_changes = |annotations: &mut Vec<InlineAnnotation>| {
let apply_lsp_annotations_changes = |annotations: &mut Vec<InlineAnnotation>| {
changes.update_positions(
annotations
.iter_mut()
Expand All @@ -1460,11 +1460,11 @@ impl Document {
padding_after_inlay_hints,
} = text_annotation;

apply_inlay_hint_changes(padding_before_inlay_hints);
apply_inlay_hint_changes(type_inlay_hints);
apply_inlay_hint_changes(parameter_inlay_hints);
apply_inlay_hint_changes(other_inlay_hints);
apply_inlay_hint_changes(padding_after_inlay_hints);
apply_lsp_annotations_changes(padding_before_inlay_hints);
apply_lsp_annotations_changes(type_inlay_hints);
apply_lsp_annotations_changes(parameter_inlay_hints);
apply_lsp_annotations_changes(other_inlay_hints);
apply_lsp_annotations_changes(padding_after_inlay_hints);
}

for text_annotation in self.color_swatches.values_mut() {
Expand All @@ -1475,8 +1475,8 @@ impl Document {
color_swatches_padding,
} = text_annotation;

apply_inlay_hint_changes(color_swatches);
apply_inlay_hint_changes(color_swatches_padding);
apply_lsp_annotations_changes(color_swatches);
apply_lsp_annotations_changes(color_swatches_padding);
}

helix_event::dispatch(DocumentDidChange {
Expand Down

0 comments on commit 67552f6

Please sign in to comment.