summaryrefslogtreecommitdiffstats
path: root/pkg/gui/pty.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-04-04 23:51:59 +1000
committerJesse Duffield <jessedduffield@gmail.com>2021-04-06 19:34:32 +1000
commit4fe512ff3a299102c2bd78bc83b8644582127aae (patch)
tree5a34eacc1c137a8c98624ba29b757c0a717cf694 /pkg/gui/pty.go
parent4197921465a6cb67d5fdd5b63de653493a5ebd41 (diff)
test
type safe view access
Diffstat (limited to 'pkg/gui/pty.go')
-rw-r--r--pkg/gui/pty.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/gui/pty.go b/pkg/gui/pty.go
index 03590cd40..d25c71af2 100644
--- a/pkg/gui/pty.go
+++ b/pkg/gui/pty.go
@@ -12,8 +12,7 @@ func (gui *Gui) onResize() error {
if gui.State.Ptmx == nil {
return nil
}
- mainView := gui.getMainView()
- width, height := mainView.Size()
+ width, height := gui.Views.Main.Size()
if err := pty.Setsize(gui.State.Ptmx, &pty.Winsize{Cols: uint16(width), Rows: uint16(height)}); err != nil {
return err
@@ -31,7 +30,7 @@ func (gui *Gui) onResize() error {
// pseudo-terminal meaning we'll get the behaviour we want from the underlying
// command.
func (gui *Gui) newPtyTask(viewName string, cmd *exec.Cmd, prefix string) error {
- width, _ := gui.getMainView().Size()
+ width, _ := gui.Views.Main.Size()
pager := gui.GitCommand.GetPager(width)
if pager == "" {