summaryrefslogtreecommitdiffstats
path: root/pkg/app
diff options
context:
space:
mode:
authorDavid Roman <d@vidroman.dev>2022-03-15 14:12:26 +0100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:01:28 +1100
commitb8fc829f860a1d6157ebe49f63e1b16db19c950c (patch)
treeb2248bc581aabe4bb026b44a9027b8e13a676ddb /pkg/app
parent950bb5090dfa8e553b6a066b02547fce427c1acd (diff)
Record current directory on switch
Diffstat (limited to 'pkg/app')
-rw-r--r--pkg/app/app.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/app/app.go b/pkg/app/app.go
index cb9aaafea..f38dcb75e 100644
--- a/pkg/app/app.go
+++ b/pkg/app/app.go
@@ -128,6 +128,11 @@ func NewApp(config config.AppConfigurer, filterPath string) (*App, error) {
return app, err
}
+ dirName, err := os.Getwd()
+ if err != nil {
+ return app, err
+ }
+
showRecentRepos, err := app.setupRepo()
if err != nil {
return app, err
@@ -135,7 +140,7 @@ func NewApp(config config.AppConfigurer, filterPath string) (*App, error) {
gitConfig := git_config.NewStdCachedGitConfig(app.Log)
- app.Gui, err = gui.NewGui(app.Common, config, gitConfig, app.Updater, filterPath, showRecentRepos)
+ app.Gui, err = gui.NewGui(app.Common, config, gitConfig, app.Updater, filterPath, showRecentRepos, dirName)
if err != nil {
return app, err
}