diff options
Diffstat (limited to 'ui/tcell/layout.go')
-rw-r--r-- | ui/tcell/layout.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/tcell/layout.go b/ui/tcell/layout.go index bc30f8c..cb2396c 100644 --- a/ui/tcell/layout.go +++ b/ui/tcell/layout.go @@ -41,6 +41,9 @@ func (wrk *Workspace) CloseCol(c *Column) { } func (wrk *Workspace) Col(i int) *Column { + if i > len(wrk.cols)-1 { + return nil + } return wrk.cols[i] } |