diff --git a/app.go b/app.go index b27f5a2..3881e75 100644 --- a/app.go +++ b/app.go @@ -163,6 +163,11 @@ func (app *app) loop() { for { select { case <-app.quitChan: + if app.nav.copyTotal > 0 { + app.ui.echoerr("quit: copy operation in progress") + continue + } + log.Print("bye!") if err := app.nav.writeMarks(); err != nil { diff --git a/nav.go b/nav.go index f6adc3f..78554f0 100644 --- a/nav.go +++ b/nav.go @@ -389,7 +389,7 @@ func (nav *nav) preview() { for i := 0; i < nav.height && buf.Scan(); i++ { for _, r := range buf.Text() { if r == 0 { - reg.lines = []string{"\033[mbinary\033[0m"} + reg.lines = []string{"\033[7mbinary\033[0m"} nav.regChan <- reg return } diff --git a/ui.go b/ui.go index 36738ff..2587dda 100644 --- a/ui.go +++ b/ui.go @@ -182,7 +182,7 @@ func (win *win) printReg(reg *reg) { fg, bg := termbox.ColorDefault, termbox.ColorDefault if reg.loading { - fg = termbox.AttrBold + fg = termbox.AttrReverse win.print(2, 0, fg, bg, "loading...") return } @@ -249,13 +249,13 @@ func (win *win) printDir(dir *dir, selections map[string]int, saves map[string]b fg, bg := termbox.ColorDefault, termbox.ColorDefault if dir.loading { - fg = termbox.AttrBold + fg = termbox.AttrReverse win.print(2, 0, fg, bg, "loading...") return } if len(dir.files) == 0 { - fg = termbox.AttrBold + fg = termbox.AttrReverse win.print(2, 0, fg, bg, "empty") return }