MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / CloseContextMenu

Method CloseContextMenu

internal/ui/components/context_menu.go:108–118  ·  view source on GitHub ↗

CloseContextMenu closes the context menu and restores the previous focus.

()

Source from the content-addressed store, hash-verified

106
107// CloseContextMenu closes the context menu and restores the previous focus.
108func (a *App) CloseContextMenu() {
109 if a.isMenuOpen {
110 a.pages.RemovePage("contextMenu")
111 a.isMenuOpen = false
112 a.contextMenu = nil
113
114 if a.lastFocus != nil {
115 a.SetFocus(a.lastFocus)
116 }
117 }
118}
119
120func clamp(val, minVal, maxVal int) int {
121 if val < minVal {

Callers 5

showStorageMenuMethod · 0.95
ShowNodeContextMenuMethod · 0.95
ShowVMContextMenuMethod · 0.95
ShowGlobalContextMenuMethod · 0.95

Calls 1

SetFocusMethod · 0.65

Tested by

no test coverage detected