cleanup: rm strange code block

This commit is contained in:
lengyijun
2025-03-11 16:50:10 +08:00
committed by Johannes Altmanninger
parent b0be53ed6a
commit 18c4ee4b41

View File

@@ -1675,27 +1675,24 @@ fn paint_layout(&mut self, reason: &wstr, is_final_rendering: bool) {
}
}
let mut indents;
{
// Extend our colors with the autosuggestion.
let pos = autosuggested_range.start;
colors.splice(
pos..pos,
vec![
if self.flash_autosuggestion {
HighlightSpec::with_both(HighlightRole::search_match)
} else {
HighlightSpec::with_fg(HighlightRole::autosuggestion)
};
autosuggested_range.len()
],
);
// Extend our colors with the autosuggestion.
let pos = autosuggested_range.start;
colors.splice(
pos..pos,
vec![
if self.flash_autosuggestion {
HighlightSpec::with_both(HighlightRole::search_match)
} else {
HighlightSpec::with_fg(HighlightRole::autosuggestion)
};
autosuggested_range.len()
],
);
// Compute the indentation, then extend it with 0s for the autosuggestion. The autosuggestion
// always conceptually has an indent of 0.
indents = parse_util_compute_indents(cmd_line.text());
indents.splice(pos..pos, vec![0; autosuggested_range.len()]);
}
// Compute the indentation, then extend it with 0s for the autosuggestion. The autosuggestion
// always conceptually has an indent of 0.
let mut indents = parse_util_compute_indents(cmd_line.text());
indents.splice(pos..pos, vec![0; autosuggested_range.len()]);
let screen = &mut self.data.screen;
let pager = &mut self.data.pager;