diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-26 14:33:39 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-26 18:00:46 +1100 |
commit | 102c33433b24c9e128d28f5291107fa338e17c8e (patch) | |
tree | 333a830b90af3bc75527e2d97a9653b6bfc2c573 /pkg/gui/context.go | |
parent | fe87114074ae72e3c548f5b05fb50a919eda0f94 (diff) |
remove dead code
Diffstat (limited to 'pkg/gui/context.go')
-rw-r--r-- | pkg/gui/context.go | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/pkg/gui/context.go b/pkg/gui/context.go index d78388bf0..8d3d91185 100644 --- a/pkg/gui/context.go +++ b/pkg/gui/context.go @@ -430,17 +430,15 @@ func (gui *Gui) setViewTabForContext(c types.Context) { } for tabIndex, tabContext := range tabContexts { - for _, context := range tabContext.Contexts { - if context.GetKey() == c.GetKey() { - // get the view, set the tab - v, err := gui.g.View(c.GetViewName()) - if err != nil { - gui.c.Log.Error(err) - return - } - v.TabIndex = tabIndex + if tabContext.Context.GetKey() == c.GetKey() { + // get the view, set the tab + v, err := gui.g.View(c.GetViewName()) + if err != nil { + gui.c.Log.Error(err) return } + v.TabIndex = tabIndex + return } } } |