mirror of
https://github.com/antonmedv/fx.git
synced 2024-08-17 06:00:32 +03:00
fix dig-path ctrl+w (#275)
This commit is contained in:
parent
7abb4de3d3
commit
8caeacff62
4
main.go
4
main.go
@ -253,7 +253,9 @@ func (m *model) handleDigKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
case key.Matches(msg, key.NewBinding(key.WithKeys("ctrl+w"))):
|
||||
digPath, ok := jsonpath.Split(m.digInput.Value())
|
||||
if ok {
|
||||
digPath = digPath[:len(digPath)-1]
|
||||
if len(digPath) > 0 {
|
||||
digPath = digPath[:len(digPath)-1]
|
||||
}
|
||||
n := m.selectByPath(digPath)
|
||||
if n != nil {
|
||||
m.selectNode(n)
|
||||
|
Loading…
Reference in New Issue
Block a user