diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-08-06 18:05:00 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-08-06 18:05:00 +1000 |
commit | 445a625b56a79be6cee7ec1ee35fe9f4fcc2daad (patch) | |
tree | 1258e2bb1f5f486c109b9150e0805ded0d2fac90 /pkg/gui/context_config.go | |
parent | cd2c01d1cfb0236ccb7c94a8aae21726ef1283d1 (diff) |
rename merging context to mergeConflicts
Diffstat (limited to 'pkg/gui/context_config.go')
-rw-r--r-- | pkg/gui/context_config.go | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/pkg/gui/context_config.go b/pkg/gui/context_config.go index 1ff8aad75..79f14c68c 100644 --- a/pkg/gui/context_config.go +++ b/pkg/gui/context_config.go @@ -10,7 +10,7 @@ func (gui *Gui) contextTree() *context.ContextTree { Global: context.NewSimpleContext( context.NewBaseContext(context.NewBaseContextOpts{ Kind: types.GLOBAL_CONTEXT, - View: nil, + View: nil, // TODO: see if this breaks anything WindowName: "", Key: context.GLOBAL_CONTEXT_KEY, Focusable: false, @@ -158,27 +158,22 @@ func (gui *Gui) contextTree() *context.ContextTree { }), context.ContextCallbackOpts{}, ), - Merging: context.NewSimpleContext( - context.NewBaseContext(context.NewBaseContextOpts{ - Kind: types.MAIN_CONTEXT, - View: gui.Views.Merging, - WindowName: "main", - Key: context.MERGING_MAIN_CONTEXT_KEY, - OnGetOptionsMap: gui.getMergingOptions, - Focusable: true, - }), + MergeConflicts: context.NewMergeConflictsContext( + gui.Views.MergeConflicts, context.ContextCallbackOpts{ OnFocus: OnFocusWrapper(func() error { - gui.Views.Merging.Wrap = false + gui.Views.MergeConflicts.Wrap = false return gui.renderConflictsWithLock(true) }), OnFocusLost: func(types.OnFocusLostOpts) error { - gui.Views.Merging.Wrap = true + gui.Views.MergeConflicts.Wrap = true return nil }, }, + gui.c, + gui.getMergingOptions, ), Confirmation: context.NewSimpleContext( context.NewBaseContext(context.NewBaseContextOpts{ |