fixe bugg
This commit is contained in:
parent
117fa5085b
commit
fcb23827e4
12
bubbletea.go
12
bubbletea.go
@ -50,11 +50,17 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
|
||||
// new task
|
||||
case "n":
|
||||
m.addTask = true
|
||||
m.textinput.Focus()
|
||||
if !m.addTask {
|
||||
m.addTask = true
|
||||
m.textinput.Focus()
|
||||
m.textinput.Reset()
|
||||
}
|
||||
|
||||
case "esc":
|
||||
m.addTask = false
|
||||
if m.addTask {
|
||||
m.addTask = false
|
||||
m.textinput.Reset()
|
||||
}
|
||||
|
||||
// The "enter" key and the spacebar (a literal space) toggle
|
||||
// the selected state for the item that the cursor is pointing at.
|
||||
|
Loading…
x
Reference in New Issue
Block a user