mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-09 09:22:48 +03:00
Remove deprecated edit configs
They were deprecated in April 2023 (see 046b0d9daa
), so it's been well over a
year now.
This commit is contained in:
@@ -816,8 +816,6 @@ func (gui *Gui) Run(startArgs appTypes.StartArgs) error {
|
||||
return err
|
||||
}
|
||||
|
||||
defer gui.checkForDeprecatedEditConfigs()
|
||||
|
||||
gui.g = g
|
||||
defer gui.g.Close()
|
||||
|
||||
@@ -889,37 +887,6 @@ func (gui *Gui) RunAndHandleError(startArgs appTypes.StartArgs) error {
|
||||
})
|
||||
}
|
||||
|
||||
func (gui *Gui) checkForDeprecatedEditConfigs() {
|
||||
osConfig := &gui.UserConfig().OS
|
||||
deprecatedConfigs := []struct {
|
||||
config string
|
||||
oldName string
|
||||
newName string
|
||||
}{
|
||||
{osConfig.EditCommand, "EditCommand", "Edit"},
|
||||
{osConfig.EditCommandTemplate, "EditCommandTemplate", "Edit,EditAtLine"},
|
||||
{osConfig.OpenCommand, "OpenCommand", "Open"},
|
||||
{osConfig.OpenLinkCommand, "OpenLinkCommand", "OpenLink"},
|
||||
}
|
||||
deprecatedConfigStrings := []string{}
|
||||
|
||||
for _, dc := range deprecatedConfigs {
|
||||
if dc.config != "" {
|
||||
deprecatedConfigStrings = append(deprecatedConfigStrings, fmt.Sprintf(" OS.%s -> OS.%s", dc.oldName, dc.newName))
|
||||
}
|
||||
}
|
||||
if len(deprecatedConfigStrings) != 0 {
|
||||
warningMessage := utils.ResolvePlaceholderString(
|
||||
gui.c.Tr.DeprecatedEditConfigWarning,
|
||||
map[string]string{
|
||||
"configs": strings.Join(deprecatedConfigStrings, "\n"),
|
||||
},
|
||||
)
|
||||
|
||||
os.Stdout.Write([]byte(warningMessage))
|
||||
}
|
||||
}
|
||||
|
||||
// returns whether command exited without error or not
|
||||
func (gui *Gui) runSubprocessWithSuspenseAndRefresh(subprocess *oscommands.CmdObj) error {
|
||||
_, err := gui.runSubprocessWithSuspense(subprocess)
|
||||
|
Reference in New Issue
Block a user