diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-23 14:40:28 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-17 19:13:40 +1100 |
commit | a2318d75b5a81aba6f79ffbd76c8a602121ac20c (patch) | |
tree | 4288c9265a2ed3d70761f3295783a53d718c5230 /pkg/gui/files_panel.go | |
parent | 1dd7307fde033dae5fececac15810a99e26c3d91 (diff) |
fix some things
Diffstat (limited to 'pkg/gui/files_panel.go')
-rw-r--r-- | pkg/gui/files_panel.go | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 8ebecba14..9c0fbd24e 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -301,23 +301,13 @@ func (gui *Gui) findNewSelectedIdx(prevNodes []*filetree.FileNode, currNodes []* func (gui *Gui) onFocusFile() error { gui.takeOverMergeConflictScrolling() - - if gui.State.Panels.Merging.GetPath() != file.Name { - hasConflicts, err := gui.setMergeStateWithLock(file.Name) - if err != nil { - return err - } - if !hasConflicts { - return nil - } - } - - // TODO: this can't be right. - return gui.pushContext(gui.State.Contexts.Merging) + return nil } -func (gui *Gui) getSetTextareaTextFn(view *gocui.View) func(string) { +func (gui *Gui) getSetTextareaTextFn(getView func() *gocui.View) func(string) { return func(text string) { + // using a getView function so that we don't need to worry about when the view is created + view := getView() view.ClearTextArea() view.TextArea.TypeString(text) view.RenderTextArea() |