Skip to content

Commit

Permalink
fix initial input field setting
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed May 12, 2021
1 parent b98ccbc commit 86716ec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,12 @@ func showDirWindow(inputField *tview.InputField) {
}
})

// set input field to current node
currentNode := tree.GetCurrentNode()
reference := currentNode.GetReference()
if reference != nil {
inputField.SetText(reference.(string))
}

layoutRoot.AddPage(windowName, popup(windowWidth, windowHeight, tree), true, true)
}

0 comments on commit 86716ec

Please sign in to comment.