mirror of
https://github.com/antonmedv/fx.git
synced 2024-08-17 14:10:46 +03:00
Replace gid input with current path only if cursor at the end
This commit is contained in:
parent
c2251d223e
commit
7391b11e45
6
main.go
6
main.go
@ -291,8 +291,10 @@ func (m *model) handleDigKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
|
||||
default:
|
||||
if key.Matches(msg, key.NewBinding(key.WithKeys("."))) {
|
||||
m.digInput.SetValue(m.cursorPath())
|
||||
m.digInput.CursorEnd()
|
||||
if m.digInput.Position() == len(m.digInput.Value()) {
|
||||
m.digInput.SetValue(m.cursorPath())
|
||||
m.digInput.CursorEnd()
|
||||
}
|
||||
}
|
||||
|
||||
m.digInput, cmd = m.digInput.Update(msg)
|
||||
|
Loading…
Reference in New Issue
Block a user