render tabs in diff (closes #12)

This commit is contained in:
Stephan Dilly 2020-04-09 12:43:51 +02:00
parent d2d69063e3
commit acea66e829
2 changed files with 3 additions and 4 deletions

View file

@ -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
* https://github.com/git-up/GitUp (would be nice to comeup with a way to have the map view available in a terminal tool)

View file

@ -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 => {