mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
correctly show files with special chars in commit
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
package presentation
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
"github.com/jesseduffield/lazygit/pkg/theme"
|
||||
@ -50,15 +48,7 @@ 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)
|
||||
output += restColor.Sprint(utils.EscapeSpecialChars(name))
|
||||
|
||||
if file != nil && file.IsSubmodule(submoduleConfigs) {
|
||||
output += utils.ColoredString(" (submodule)", theme.DefaultTextColor)
|
||||
|
Reference in New Issue
Block a user