aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA-Walrus2022-10-11 07:00:41 +0000
committerBlaž Hrastnik2022-10-17 15:38:16 +0000
commit2c36e33e0ac55d01baacb9714d9d77d7dd532d98 (patch)
tree89cd8565c7354133c2bed0e0eacef4b3e621a2fe
parent3ba665d804c8d88bc3d59a52296f349acdb6d436 (diff)
Make skip_levels a u8
-rw-r--r--helix-term/src/ui/editor.rs3
-rw-r--r--helix-view/src/editor.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index c6a83546..e05136d0 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -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.
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index dd1e30f9..e9a3c639 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -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 {