Skip to content

Commit

Permalink
Make skip_levels a u8
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Walrus authored and archseer committed Oct 17, 2022
1 parent 3ba665d commit 2c36e33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion helix-term/src/ui/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,8 @@ impl EditorView {
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.

Expand Down
2 changes: 1 addition & 1 deletion helix-view/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ impl Default for WhitespaceCharacters {
pub struct IndentGuidesConfig {
pub render: bool,
pub character: char,
pub skip_levels: usize,
pub skip_levels: u8,
}

impl Default for IndentGuidesConfig {
Expand Down

0 comments on commit 2c36e33

Please sign in to comment.