diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-16 23:09:01 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-16 23:16:05 +1100 |
commit | 99035959a110bd1b7f5e030d02ddf71384aad812 (patch) | |
tree | 7d089bba625bd6d6c9596a9e52e33fa40e001580 /pkg/gui | |
parent | 0092c9d08db6d60fe992c60c6cdacf3703e2cf2a (diff) |
fix merge scroll bug
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/merge_panel.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/gui/merge_panel.go b/pkg/gui/merge_panel.go index 942340286..8abd55131 100644 --- a/pkg/gui/merge_panel.go +++ b/pkg/gui/merge_panel.go @@ -182,7 +182,12 @@ func (gui *Gui) renderConflicts(state *mergeconflicts.State, hasFocus bool) (boo content := mergeconflicts.ColoredConflictFile(cat, state, hasFocus) if !gui.State.Panels.Merging.UserVerticalScrolling { - gui.centerYPos(gui.Views.Main, state.GetConflictMiddle()) + // TODO: find a way to not have to do this OnUIThread thing. Why doesn't it work + // without it given that we're calling the 'no scroll' variant below? + gui.OnUIThread(func() error { + gui.centerYPos(gui.Views.Main, state.GetConflictMiddle()) + return nil + }) } return true, gui.refreshMainViews(refreshMainOpts{ |