diff --git a/simple/menu.go b/simple/menu.go index 2c0e9cf..9b9e9d0 100644 --- a/simple/menu.go +++ b/simple/menu.go @@ -158,6 +158,13 @@ func (m *Menu) AddCommand(key, name string, action CommandAction) (*commandNode, return m.cmdTree.Root.AddCommand(key, name, action), nil } +func (m *Menu) clearLines() { + for i := 0; i < int(m.lineCounter); i++ { + fmt.Printf("\033[F\033[K") + } + m.lineCounter = 0 +} + func (m *Menu) iteration() { fmt.Printf("%s\n", m.Title) path := ""