mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-20 05:19:24 +02:00
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.
This commit is contained in:
parent
8e7f278094
commit
5e95019b3f
@ -212,15 +212,16 @@ func (gui *Gui) refreshMergePanel() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := gui.newStringTask("main", content); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := gui.scrollToConflict(gui.g); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user