mirror of
https://github.com/aykhans/sarin.git
synced 2026-10-17 14:53:52 +00:00
fix: restore pre-v2 progress bar fill and viewport scroll behavior
This commit is contained in:
3 files changed
+6
-11
No files matched your search
+1
-10
@@ -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"
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in new issue
Block a user