From acea66e829dd0f439d8e9f09fc100902f496ab7d Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Thu, 9 Apr 2020 12:43:51 +0200 Subject: [PATCH] render tabs in diff (closes #12) --- README.md | 4 +--- src/components/diff.rs | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e5c29a1e..a9543f28 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,4 @@ GITUI_LOGGING=true gitui * https://github.com/jesseduffield/lazygit * https://github.com/jonas/tig -* https://github.com/git-up/GitUp (would be nice to comeup with a way to have the map view available in a terminal tool) - -test \ No newline at end of file +* https://github.com/git-up/GitUp (would be nice to comeup with a way to have the map view available in a terminal tool) \ No newline at end of file diff --git a/src/components/diff.rs b/src/components/diff.rs index 829ac44d..6074130f 100644 --- a/src/components/diff.rs +++ b/src/components/diff.rs @@ -244,7 +244,8 @@ impl DiffComponent { // weird eof missing eol line format!("{}\n", line.content.trim_matches('\n')) }; - let content = Cow::from(filled); + //TODO: allow customize tabsize + let content = Cow::from(filled.replace("\t", " ")); text.push(match line.line_type { DiffLineType::Delete => {