Skip to content

Commit

Permalink
fixed focus and file name bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerMizuyabu committed Aug 9, 2024
1 parent 87dea99 commit d91c916
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/gen/common/hcl.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type HCLWritable interface {
func OutputHCLToFile(fileName string, writable HCLWritable) error {
file := hclwrite.NewEmptyFile()
writable.WriteHCL(file)
output, err := os.Create("repository_set.inputs.hcl")
output, err := os.Create(fileName)
if err != nil {
return err
}
Expand Down
1 change: 1 addition & 0 deletions cmd/gen/common/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func (m model[T]) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
q.SetDimensions(msg.Width, msg.Height)
resizeCmds = append(resizeCmds, q.Update(msg))
}
m.questions[0].Focus()
m.viewport.SetContent(m.questions[0].View())
return m, tea.Batch(resizeCmds...)
case tea.KeyMsg:
Expand Down

0 comments on commit d91c916

Please sign in to comment.