summaryrefslogtreecommitdiffstats
path: root/pkg/gui/view_helpers.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-05-19 18:01:29 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-05-19 18:05:14 +1000
commit36ac764133d3837a22619db922bd8d54f4b0938e (patch)
tree0128185188ab95ae95c172ca7f71fb521ecec960 /pkg/gui/view_helpers.go
parent003e45d2f5447d1f88e59e2f1edd85effeaae3ae (diff)
fix race condition when scrolling to merge conflict
Diffstat (limited to 'pkg/gui/view_helpers.go')
-rw-r--r--pkg/gui/view_helpers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go
index c647d1819..429ab46b5 100644
--- a/pkg/gui/view_helpers.go
+++ b/pkg/gui/view_helpers.go
@@ -340,7 +340,7 @@ func (gui *Gui) cleanString(s string) string {
return utils.NormalizeLinefeeds(output)
}
-func (gui *Gui) setViewContent(g *gocui.Gui, v *gocui.View, s string) {
+func (gui *Gui) setViewContent(v *gocui.View, s string) {
v.Clear()
fmt.Fprint(v, gui.cleanString(s))
}
@@ -358,7 +358,7 @@ func (gui *Gui) renderString(g *gocui.Gui, viewName, s string) {
if err := v.SetCursor(0, 0); err != nil {
return err
}
- gui.setViewContent(gui.g, v, s)
+ gui.setViewContent(v, s)
return nil
})
}