mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-17 01:42:45 +02:00
rename field
This commit is contained in:
@ -125,7 +125,13 @@ type Gui struct {
|
|||||||
|
|
||||||
IsNewRepo bool
|
IsNewRepo bool
|
||||||
|
|
||||||
InitialRepoDir string
|
// this is the initial dir we are in upon opening lazygit. We hold onto this
|
||||||
|
// in case we want to restore it before quitting for users who have set up
|
||||||
|
// the feature for changing directory upon quit.
|
||||||
|
// The reason we don't just wait until quit time to handle changing directories
|
||||||
|
// is because some users want to keep track of the current lazygit directory in an outside
|
||||||
|
// process
|
||||||
|
InitialDir string
|
||||||
}
|
}
|
||||||
|
|
||||||
type listPanelState struct {
|
type listPanelState struct {
|
||||||
@ -449,7 +455,7 @@ func NewGui(
|
|||||||
updater *updates.Updater,
|
updater *updates.Updater,
|
||||||
filterPath string,
|
filterPath string,
|
||||||
showRecentRepos bool,
|
showRecentRepos bool,
|
||||||
initialRepoDir string,
|
initialDir string,
|
||||||
) (*Gui, error) {
|
) (*Gui, error) {
|
||||||
gui := &Gui{
|
gui := &Gui{
|
||||||
Common: cmn,
|
Common: cmn,
|
||||||
@ -468,7 +474,7 @@ func NewGui(
|
|||||||
// sake of backwards compatibility. We're making use of short circuiting here
|
// sake of backwards compatibility. We're making use of short circuiting here
|
||||||
ShowExtrasWindow: cmn.UserConfig.Gui.ShowCommandLog && !config.GetAppState().HideCommandLog,
|
ShowExtrasWindow: cmn.UserConfig.Gui.ShowCommandLog && !config.GetAppState().HideCommandLog,
|
||||||
|
|
||||||
InitialRepoDir: initialRepoDir,
|
InitialDir: initialDir,
|
||||||
}
|
}
|
||||||
|
|
||||||
guiIO := oscommands.NewGuiIO(
|
guiIO := oscommands.NewGuiIO(
|
||||||
@ -596,7 +602,7 @@ func (gui *Gui) RunAndHandleError() error {
|
|||||||
switch err {
|
switch err {
|
||||||
case gocui.ErrQuit:
|
case gocui.ErrQuit:
|
||||||
if gui.State.RetainOriginalDir {
|
if gui.State.RetainOriginalDir {
|
||||||
if err := gui.recordDirectory(gui.InitialRepoDir); err != nil {
|
if err := gui.recordDirectory(gui.InitialDir); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user