Skip to content

Commit

Permalink
Tab width should always be the configured indentation width
Browse files Browse the repository at this point in the history
`tab_width()` should return the configured indentation width to
appear visually as the correct size regardless of the mode's
configured indentation unit.

This resolves the issue were tabs appear as single width character
rather the configured indentation width in modes who's indentation
unit is spaces.
  • Loading branch information
iainh authored and mcobzarenco committed Jul 30, 2022
1 parent fa63b41 commit 8fa7deb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions zee-grammar/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ impl IndentationConfig {
}

pub fn tab_width(&self) -> usize {
match self.unit {
IndentationUnit::Space => 1,
IndentationUnit::Tab => self.width,
}
self.width
}
}

Expand Down

0 comments on commit 8fa7deb

Please sign in to comment.