diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-01-12 14:22:30 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-01-12 14:43:17 +1100 |
commit | 5e95019b3f6881657e77b9aaae39dc9c378d969e (patch) | |
tree | 3b539da997fa0f10bd96efa037a1a47659603586 | |
parent | 8e7f278094e70b54d3d8e385bd97500858c0e560 (diff) |
Missed a spot with this new string task thing
The issue here was that we were using a string task
but expecting to be able to set the origin straight after
to point at the conflict, but because it's async it was
actually resetting the origin to 0 after a little bit.
The proper solution here is maybe to add a flag to that thing
asking whether you want to reset main's origin. But I'm
too lazy to do that right now so instead I'm just using
setViewContent. That will probably cause issues in the future.
-rw-r--r-- | pkg/gui/merge_panel.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/gui/merge_panel.go b/pkg/gui/merge_panel.go index 4b86cf6c0..5e6272f38 100644 --- a/pkg/gui/merge_panel.go +++ b/pkg/gui/merge_panel.go @@ -212,16 +212,17 @@ func (gui *Gui) refreshMergePanel() error { if err != nil { return err } - if err := gui.newStringTask("main", content); err != nil { + + mainView := gui.getMainView() + mainView.Wrap = false + if err := gui.setViewContent(gui.g, mainView, content); err != nil { return err } + gui.Log.Warn("scrolling to conflict") if err := gui.scrollToConflict(gui.g); err != nil { return err } - mainView := gui.getMainView() - mainView.Wrap = false - return nil } |