mirror of
https://github.com/antonmedv/fx.git
synced 2024-09-11 18:27:10 +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"))):
|
case key.Matches(msg, key.NewBinding(key.WithKeys("ctrl+w"))):
|
||||||
digPath, ok := jsonpath.Split(m.digInput.Value())
|
digPath, ok := jsonpath.Split(m.digInput.Value())
|
||||||
if ok {
|
if ok {
|
||||||
digPath = digPath[:len(digPath)-1]
|
if len(digPath) > 0 {
|
||||||
|
digPath = digPath[:len(digPath)-1]
|
||||||
|
}
|
||||||
n := m.selectByPath(digPath)
|
n := m.selectByPath(digPath)
|
||||||
if n != nil {
|
if n != nil {
|
||||||
m.selectNode(n)
|
m.selectNode(n)
|
||||||
|
Loading…
Reference in New Issue
Block a user