diff options
author | Blaž Hrastnik | 2021-03-22 04:47:39 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-03-22 04:53:36 +0000 |
commit | 5e6716c89c0909bc374e26bedbba703427f9aa26 (patch) | |
tree | 658163e26962c436d0406f8dcf0d5f900116efdc /helix-term/src/ui | |
parent | 698e4ddea46e9c94d537c8e4a6c69e7dc9ee1947 (diff) |
Add tab_width and indent_unit config.
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/editor.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 3ee9d446..c48dc97e 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -6,7 +6,6 @@ use crate::{ }; use helix_core::{ - indent::TAB_WIDTH, syntax::{self, HighlightEvent}, Position, Range, }; @@ -106,6 +105,7 @@ impl EditorView { let mut spans = Vec::new(); let mut visual_x = 0; let mut line = 0u16; + let tab_width = view.doc.tab_width(); 'outer: for event in highlights { match event.unwrap() { @@ -152,7 +152,7 @@ impl EditorView { break 'outer; } } else if grapheme == "\t" { - visual_x += (TAB_WIDTH as u16); + visual_x += (tab_width as u16); } else { if visual_x >= viewport.width { // if we're offscreen just keep going until we hit a new line |