mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
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:
parent
1573a449f8
commit
9a087d04eb
3 changed files with 57 additions and 14 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue