Change the way file statuses are loaded

This makes it so file statuses recived from git no longer get joined
before spliting them again.
This commit is contained in:
mjarkk 2021-07-22 12:02:41 +02:00
parent 1573a449f8
commit 9a087d04eb
3 changed files with 57 additions and 14 deletions

View file

@ -1,6 +1,8 @@
package presentation
import (
"strings"
"github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/theme"
@ -48,6 +50,14 @@ func GetFileLine(hasUnstagedChanges bool, hasStagedChanges bool, name string, di
output += restColor.Sprint(" ")
}
name = strings.NewReplacer(
"\n", "\\n",
"\r", "\\r",
"\t", "\\t",
"\b", "\\b",
"\f", "\\f",
"\v", "\\v",
).Replace(name)
output += restColor.Sprint(name)
if file != nil && file.IsSubmodule(submoduleConfigs) {