fix: restore pre-v2 progress bar fill and viewport scroll behavior

This commit is contained in:
2026-08-17 18:57:33 +04:00
parent d08b6dc222
commit d68c557dd3
3 changed files with 6 additions and 11 deletions
+1 -10
View File
@@ -56,16 +56,9 @@ linters:
settings:
errcheck:
# Lip Gloss print helpers wrap fmt.Fprint* and fail only on unactionable
# write errors (broken pipe, full disk). errcheck excludes the fmt
# equivalents by default; these are excluded for the same reason.
exclude-functions:
- charm.land/lipgloss/v2.Print
- charm.land/lipgloss/v2.Printf
- charm.land/lipgloss/v2.Println
- charm.land/lipgloss/v2.Fprint
- charm.land/lipgloss/v2.Fprintf
- charm.land/lipgloss/v2.Fprintln
- charm.land/lipgloss/v2.Fprintln(os.Stderr)
staticcheck:
checks:
- "all"
@@ -92,8 +85,6 @@ linters:
- staticcheck
text: "SA5011"
# Counterpart to the errcheck exclusions above: gosec's G104 keeps its
# own allowlist, which covers fmt but not the Lip Gloss print helpers.
- linters:
- gosec
text: "G104"
+1
View File
@@ -858,6 +858,7 @@ func (m *printConfigModel) handleResize(msg tea.WindowSizeMsg) {
if !m.ready {
m.viewport = viewport.New(viewport.WithWidth(width), viewport.WithHeight(height))
m.viewport.SetHorizontalStep(0)
m.viewport.SetContent(m.contentWithLineNumbers())
m.ready = true
} else {
+4 -1
View File
@@ -242,7 +242,10 @@ func (s sarin) streamProgress(
var program *tea.Program
if total > 0 {
model := progressModel{
progress: progress.New(progress.WithColors(lipgloss.Color("#151594"), lipgloss.Color("#00D4FF"))),
progress: progress.New(
progress.WithColors(lipgloss.Color("#151594"), lipgloss.Color("#00D4FF")),
progress.WithFillCharacters(progress.DefaultFullCharFullBlock, progress.DefaultEmptyCharBlock),
),
startTime: time.Now(),
logs: make([]string, 8),
counter: counter,