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

This commit is contained in:
aykhans committed 2026-08-17 18:57:33 +04:00
1 parent d08b6dc222
commit d68c557dd3
3 files changed
+6 -11

No files matched your search

+1 -10
View File
@@ -56,16 +56,9 @@ linters:
settings: settings:
errcheck: 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: exclude-functions:
- charm.land/lipgloss/v2.Print
- charm.land/lipgloss/v2.Printf
- charm.land/lipgloss/v2.Println - charm.land/lipgloss/v2.Println
- charm.land/lipgloss/v2.Fprint - charm.land/lipgloss/v2.Fprintln(os.Stderr)
- charm.land/lipgloss/v2.Fprintf
- charm.land/lipgloss/v2.Fprintln
staticcheck: staticcheck:
checks: checks:
- "all" - "all"
@@ -92,8 +85,6 @@ linters:
- staticcheck - staticcheck
text: "SA5011" 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: - linters:
- gosec - gosec
text: "G104" text: "G104"
+1
View File
@@ -858,6 +858,7 @@ func (m *printConfigModel) handleResize(msg tea.WindowSizeMsg) {
if !m.ready { if !m.ready {
m.viewport = viewport.New(viewport.WithWidth(width), viewport.WithHeight(height)) m.viewport = viewport.New(viewport.WithWidth(width), viewport.WithHeight(height))
m.viewport.SetHorizontalStep(0)
m.viewport.SetContent(m.contentWithLineNumbers()) m.viewport.SetContent(m.contentWithLineNumbers())
m.ready = true m.ready = true
} else { } else {
+4 -1
View File
@@ -242,7 +242,10 @@ func (s sarin) streamProgress(
var program *tea.Program var program *tea.Program
if total > 0 { if total > 0 {
model := progressModel{ 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(), startTime: time.Now(),
logs: make([]string, 8), logs: make([]string, 8),
counter: counter, counter: counter,