mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-08 18:34:59 +01:00
really disable history nav when completions dialog is open (#50)
This commit is contained in:
@@ -43,6 +43,7 @@ type App struct {
|
||||
|
||||
// UI state
|
||||
filepickerOpen bool
|
||||
completionDialogOpen bool
|
||||
}
|
||||
|
||||
func New(ctx context.Context, conn *sql.DB) (*App, error) {
|
||||
@@ -141,6 +142,16 @@ func (app *App) SetFilepickerOpen(open bool) {
|
||||
app.filepickerOpen = open
|
||||
}
|
||||
|
||||
// IsCompletionDialogOpen returns whether the completion dialog is currently open
|
||||
func (app *App) IsCompletionDialogOpen() bool {
|
||||
return app.completionDialogOpen
|
||||
}
|
||||
|
||||
// SetCompletionDialogOpen sets the state of the completion dialog
|
||||
func (app *App) SetCompletionDialogOpen(open bool) {
|
||||
app.completionDialogOpen = open
|
||||
}
|
||||
|
||||
// Shutdown performs a clean shutdown of the application
|
||||
func (app *App) Shutdown() {
|
||||
// Cancel all watcher goroutines
|
||||
|
||||
Reference in New Issue
Block a user