Skip to content

Commit

Permalink
revert unneeded changes
Browse files Browse the repository at this point in the history
  • Loading branch information
horriblename committed Aug 5, 2023
1 parent a9312a4 commit 4864f59
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions nav.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,16 +823,14 @@ func (nav *nav) preview(path string, sxScreen *sixelScreen, win *win) {

buf := bufio.NewScanner(reader)

for len(reg.lines) < win.h && buf.Scan() {
text := buf.Text()
for _, r := range text {
for i := 0; i < win.h && buf.Scan(); i++ {
for _, r := range buf.Text() {
if r == 0 {
reg.lines = []string{"\033[7mbinary\033[0m"}
return
}
}

reg.lines = append(reg.lines, text)
reg.lines = append(reg.lines, buf.Text())
}

if buf.Err() != nil {
Expand Down

0 comments on commit 4864f59

Please sign in to comment.