Fix: Context Menu re-opened after closing.

When "enter" was pressed (i.e an item was selected) the context menu
did close but was redrawn when the window was resized. This commit fixes
that.
This commit is contained in:
aditya-K2
2023-05-13 00:14:55 +05:30
parent 6daa31d771
commit 0ce8f06bd1

View File

@@ -64,7 +64,7 @@ func (m *Root) AddCenteredWidget(t CenteredWidget) {
} else if e.Key() == tcell.KeyEnter {
r, _ := p.GetSelection()
sHandler(r)
closeCtx()
deleteCtx()
return nil
}
return e