From 2745d9f8604cb9c2268ad754eb84085924539bcb Mon Sep 17 00:00:00 2001 From: Fernando Silva Date: Mon, 31 Jan 2022 01:07:48 -0300 Subject: [PATCH] fix: blame tabs indentation --- CHANGELOG.md | 3 +++ src/components/blame_file.rs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a240f523..edc7c031 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Fixed +* tabs indentation in blame ([#1111](https://github.com/extrawurst/gitui/issues/1117)) + ### Added * file history log [[@cruessler](https://github.com/cruessler)] ([#381](https://github.com/extrawurst/gitui/issues/381)) diff --git a/src/components/blame_file.rs b/src/components/blame_file.rs index 4c5bf4fe..3fe92098 100644 --- a/src/components/blame_file.rs +++ b/src/components/blame_file.rs @@ -6,6 +6,7 @@ use crate::{ components::{utils::string_width_align, ScrollType}, keys::SharedKeyConfig, queue::{InternalEvent, Queue}, + string_utils::tabs_to_spaces, strings, ui::{self, style::SharedTheme}, }; @@ -415,7 +416,7 @@ impl BlameFileComponent { .style(self.theme.text(true, false)), ); cells.push( - Cell::from(String::from(line)) + Cell::from(tabs_to_spaces(String::from(line))) .style(self.theme.text(true, false)), );