summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-04-12 21:10:56 +1000
committerJesse Duffield <jessedduffield@gmail.com>2021-04-12 21:48:08 +1000
commit0df6ac61405a1eaec6e7b55174930973dcbecdf0 (patch)
tree6ac33e4753ef38f96753d5de73c634632404f161
parent5453b71fd1ff6435867eee1093fee48af5b41dd3 (diff)
bump gocui to fix resizing issue
-rw-r--r--go.mod2
-rw-r--r--go.sum2
-rw-r--r--vendor/github.com/jesseduffield/gocui/gui.go15
-rw-r--r--vendor/github.com/jesseduffield/gocui/view.go1
-rw-r--r--vendor/modules.txt2
5 files changed, 16 insertions, 6 deletions
diff --git a/go.mod b/go.mod
index 566576679..ae4c8e9d4 100644
--- a/go.mod
+++ b/go.mod
@@ -20,7 +20,7 @@ require (
github.com/imdario/mergo v0.3.11
github.com/integrii/flaggy v1.4.0
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4
- github.com/jesseduffield/gocui v0.3.1-0.20210410011117-a2bb4baca390
+ github.com/jesseduffield/gocui v0.3.1-0.20210412111008-6ef019af3724
github.com/jesseduffield/termbox-go v0.0.0-20200823212418-a2289ed6aafe // indirect
github.com/jesseduffield/yaml v2.1.0+incompatible
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
diff --git a/go.sum b/go.sum
index 0c9ed0165..139bd25b0 100644
--- a/go.sum
+++ b/go.sum
@@ -110,6 +110,8 @@ github.com/jesseduffield/gocui v0.3.1-0.20210409121040-210802112d8a h1:ocrSuZxQI
github.com/jesseduffield/gocui v0.3.1-0.20210409121040-210802112d8a/go.mod h1:QWq79xplEoyhQO+dgpk3sojjTVRKjQklyTlzm5nC5Kg=
github.com/jesseduffield/gocui v0.3.1-0.20210410011117-a2bb4baca390 h1:Es72JiUjt01TtvqCugdvOR91baB3DhuWF1DNuxA0frA=
github.com/jesseduffield/gocui v0.3.1-0.20210410011117-a2bb4baca390/go.mod h1:QWq79xplEoyhQO+dgpk3sojjTVRKjQklyTlzm5nC5Kg=
+github.com/jesseduffield/gocui v0.3.1-0.20210412111008-6ef019af3724 h1:U70Do3/OSw5n/oLJGPWsQHnos2p0yq8yAeD2muioJhQ=
+github.com/jesseduffield/gocui v0.3.1-0.20210412111008-6ef019af3724/go.mod h1:QWq79xplEoyhQO+dgpk3sojjTVRKjQklyTlzm5nC5Kg=
github.com/jesseduffield/termbox-go v0.0.0-20200823212418-a2289ed6aafe h1:qsVhCf2RFyyKIUe/+gJblbCpXMUki9rZrHuEctg6M/E=
github.com/jesseduffield/termbox-go v0.0.0-20200823212418-a2289ed6aafe/go.mod h1:anMibpZtqNxjDbxrcDEAwSdaJ37vyUeM1f/M4uekib4=
github.com/jesseduffield/yaml v2.1.0+incompatible h1:HWQJ1gIv2zHKbDYNp0Jwjlj24K8aqpFHnMCynY1EpmE=
diff --git a/vendor/github.com/jesseduffield/gocui/gui.go b/vendor/github.com/jesseduffield/gocui/gui.go
index 9b2d1ad25..f47abf0fc 100644
--- a/vendor/github.com/jesseduffield/gocui/gui.go
+++ b/vendor/github.com/jesseduffield/gocui/gui.go
@@ -651,14 +651,23 @@ func (g *Gui) handleEvent(ev *GocuiEvent) error {
return g.onKey(ev)
case eventError:
return ev.Err
- // Not sure if this should be handled. It acts weirder when it's here
- // case eventResize:
- // return Sync()
+ case eventResize:
+ g.onResize()
+ return nil
default:
return nil
}
}
+func (g *Gui) onResize() {
+ for _, v := range g.views {
+ // wonder if we should be calling this in other contexts e.g. whenever the view's dimensions change in general
+ v.FlushStaleCells()
+ }
+ // Not sure if we actually need this
+ // g.screen.Sync()
+}
+
// flush updates the gui, re-drawing frames and buffers.
func (g *Gui) flush() error {
// pretty sure we don't need this, but keeping it here in case we get weird visual artifacts
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go
index 7b45c1352..c8f4507c9 100644
--- a/vendor/github.com/jesseduffield/gocui/view.go
+++ b/vendor/github.com/jesseduffield/gocui/view.go
@@ -683,7 +683,6 @@ func (v *View) FlushStaleCells() {
v.writeMutex.Lock()
defer v.writeMutex.Unlock()
- v.rewind()
v.tainted = true
v.viewLines = nil
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 7c98c9239..0aa9313ae 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -149,7 +149,7 @@ github.com/jesseduffield/go-git/v5/utils/merkletrie/filesystem
github.com/jesseduffield/go-git/v5/utils/merkletrie/index
github.com/jesseduffield/go-git/v5/utils/merkletrie/internal/frame
github.com/jesseduffield/go-git/v5/utils/merkletrie/noder
-# github.com/jesseduffield/gocui v0.3.1-0.20210410011117-a2bb4baca390
+# github.com/jesseduffield/gocui v0.3.1-0.20210412111008-6ef019af3724
## explicit
github.com/jesseduffield/gocui
# github.com/jesseduffield/termbox-go v0.0.0-20200823212418-a2289ed6aafe