Skip to content

Commit 9903595

Browse files
committed
fix merge scroll bug
1 parent 0092c9d commit 9903595

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/gui/merge_panel.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,12 @@ func (gui *Gui) renderConflicts(state *mergeconflicts.State, hasFocus bool) (boo
182182
content := mergeconflicts.ColoredConflictFile(cat, state, hasFocus)
183183

184184
if !gui.State.Panels.Merging.UserVerticalScrolling {
185-
gui.centerYPos(gui.Views.Main, state.GetConflictMiddle())
185+
// TODO: find a way to not have to do this OnUIThread thing. Why doesn't it work
186+
// without it given that we're calling the 'no scroll' variant below?
187+
gui.OnUIThread(func() error {
188+
gui.centerYPos(gui.Views.Main, state.GetConflictMiddle())
189+
return nil
190+
})
186191
}
187192

188193
return true, gui.refreshMainViews(refreshMainOpts{

0 commit comments

Comments
 (0)