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

Commit

Permalink
fix edit enabled host
Browse files Browse the repository at this point in the history
  • Loading branch information
ingbyr committed Sep 18, 2022
1 parent 2f97223 commit 86bf8c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tui/editor_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ func (v *EditorView) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
host.SetContent([]byte(v.hostEditor.Value()))
svc.UpdateNode(v.hostNode)
v.SetSaved()
// Refresh the system host if host was enabled
if v.hostNode.IsEnabled() {
svc.ApplyHost(svc.CombineEnabledHosts())
}
}
case key.Matches(m, keys.Up, keys.Down):
v.hostEditor, cmd = v.hostEditor.Update(msg)
Expand Down

0 comments on commit 86bf8c3

Please sign in to comment.