Fix issue when user could move back on root node

This commit is contained in:
qowevisa 2024-10-19 10:33:53 +03:00
parent c3d2f34f09
commit 6cd080fc72

View File

@ -192,7 +192,7 @@ func (m *Menu) handleInput(input string) {
break
}
}
if m.BackKey == input {
if m.cmdTree.Pointer != m.cmdTree.Root && m.BackKey == input {
afterHandler = func() {
m.cmdTree.Pointer = m.cmdTree.Pointer.Parent
}