Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Commit

Permalink
fix state check
Browse files Browse the repository at this point in the history
  • Loading branch information
ingbyr committed Sep 13, 2022
1 parent e42cf4a commit aa97d8e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tui/editor_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (v *EditorView) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
v.hostEditor.SetWidth(m.Width)
log.Debug(fmt.Sprintf("editor view w %d h %d", m.Width, m.Height))
case tea.KeyMsg:
if v.model.state != treeViewState {
if v.model.state != editorViewState {
return v, nil
}
switch {
Expand All @@ -81,9 +81,7 @@ func (v *EditorView) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
} else {
log.Debug("Can not edit this")
}

}

v.statusLine = "hit key: " + m.String()
}
v.RefreshStatusLine()
Expand Down

0 comments on commit aa97d8e

Please sign in to comment.