might fix repl bugs

This commit is contained in:
Robin Olsen
2026-03-22 17:12:22 +01:00
parent ecabaf796e
commit cdb3d1dcd9
2 changed files with 39 additions and 30 deletions

View File

@@ -4,9 +4,11 @@ import (
"context"
"fmt"
"log/slog"
"os"
"charm.land/bubbletea/v2"
"github.com/LazyBachelor/LazyPM/internal/models"
"golang.org/x/term"
)
type App = models.App
@@ -123,6 +125,12 @@ func (r *TaskRunner) Run(ctx context.Context, t Tasker, i Interface, iType Inter
}
}
if oldState, err := term.GetState(int(os.Stdin.Fd())); err == nil {
term.Restore(int(os.Stdin.Fd()), oldState)
}
fmt.Print("\033[0m\033[?25h")
// Questionnaire
if err := runQuestionnaire(t, iType, collector); err != nil {
return err