Skip to content

Commit

Permalink
Merge pull request #663 from noborus/fix-lint-point
Browse files Browse the repository at this point in the history
Fix lint issues
  • Loading branch information
noborus authored Nov 26, 2024
2 parents 52b8564 + 95a9521 commit df6770f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func Completion(cmd *cobra.Command, arg string) error {

// argsToFiles returns the file name from the argument.
func argsToFiles(args []string) []string {
var files []string
files := make([]string, 0, len(args))
for _, arg := range args {
argFiles, err := filepath.Glob(arg)
if err != nil {
Expand Down
6 changes: 4 additions & 2 deletions oviewer/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,11 @@ func (root *Root) suspend(context.Context) {
root.setMessageLog(err.Error())
return
}
defer func() error {
defer func() {
log.Println("Resume")
return root.Screen.Resume()
if err := root.Screen.Resume(); err != nil {
log.Println(err)
}
}()

subshell := os.Getenv("OV_SUBSHELL")
Expand Down
2 changes: 1 addition & 1 deletion oviewer/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (root *Root) filterDocument(ctx context.Context, searcher Searcher) {
writeLine(w, line)
}
go m.filterWriter(ctx, searcher, m.firstLine(), filterDoc)
root.setMessagef(msg)
root.setMessage(msg)
}

// filterWriter searches and writes to filterDoc.
Expand Down
3 changes: 1 addition & 2 deletions oviewer/oviewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package oviewer

import (
"context"
"errors"
"fmt"
"io"
"log"
Expand All @@ -12,8 +13,6 @@ import (
"sync"
"syscall"

"errors"

"code.rocketnine.space/tslocum/cbind"
"github.com/fsnotify/fsnotify"
"github.com/gdamore/tcell/v2"
Expand Down
20 changes: 10 additions & 10 deletions oviewer/ovstyle.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ func applyStyle(style tcell.Style, s OVStyle) tcell.Style {
style = style.Background(tcell.GetColor(s.Background))
}
// tcell does not support underline color.
//if s.UnderlineColor != "" {
// if s.UnderlineColor != "" {
// style = style.UnderlineColor(tcell.GetColor(s.UnderlineColor))
//}
// }
// tcell does not support underline type.
//if s.UnderlineType != 0 {
// if s.UnderlineType != 0 {
// Double,Curly,Dotted,Dashed
//}
// }
// tcell does not support vertical align type.
//if s.VerticalAlignType != 0 {
// if s.VerticalAlignType != 0 {
// Top,Middle,Bottom
//}
// }

if s.Blink {
style = style.Blink(true)
Expand All @@ -106,9 +106,9 @@ func applyStyle(style tcell.Style, s OVStyle) tcell.Style {
style = style.StrikeThrough(true)
}
// tcell does not support overline.
//if s.OverLine {
// if s.OverLine {
// style = style.Overline(true)
//}
// }

if s.UnBlink {
style = style.Blink(false)
Expand All @@ -132,9 +132,9 @@ func applyStyle(style tcell.Style, s OVStyle) tcell.Style {
style = style.StrikeThrough(false)
}
// tcell does not support overline.
//if s.UnOverLine {
// if s.UnOverLine {
// style = style.Overline(false)
//}
// }

return style
}

0 comments on commit df6770f

Please sign in to comment.