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
|
// new task
|
||||||
case "n":
|
case "n":
|
||||||
m.addTask = true
|
if !m.addTask {
|
||||||
m.textinput.Focus()
|
m.addTask = true
|
||||||
|
m.textinput.Focus()
|
||||||
|
m.textinput.Reset()
|
||||||
|
}
|
||||||
|
|
||||||
case "esc":
|
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 "enter" key and the spacebar (a literal space) toggle
|
||||||
// the selected state for the item that the cursor is pointing at.
|
// the selected state for the item that the cursor is pointing at.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user