Make skip_levels a u8

This commit is contained in:
A-Walrus 2022-10-11 10:00:41 +03:00 committed by Blaž Hrastnik
parent 3ba665d804
commit 2c36e33e0a
2 changed files with 3 additions and 2 deletions

View File

@ -465,7 +465,8 @@ pub fn render_text_highlights<H: Iterator<Item = HighlightEvent>>(
return;
}
let starting_indent = (offset.col / tab_width) + config.indent_guides.skip_levels;
let starting_indent =
(offset.col / tab_width) + config.indent_guides.skip_levels as usize;
// TODO: limit to a max indent level too. It doesn't cause visual artifacts but it would avoid some
// extra loops if the code is deeply nested.

View File

@ -558,7 +558,7 @@ fn default() -> Self {
pub struct IndentGuidesConfig {
pub render: bool,
pub character: char,
pub skip_levels: usize,
pub skip_levels: u8,
}
impl Default for IndentGuidesConfig {