mirror of
https://github.com/aykhans/sarin.git
synced 2026-08-28 02:54:32 +00:00
fix: restore pre-v2 progress bar fill and viewport scroll behavior
This commit is contained in:
+1
-10
@@ -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"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user