Skip to content

Commit

Permalink
Make the binary compile
Browse files Browse the repository at this point in the history
  • Loading branch information
walles committed Jan 5, 2024
1 parent 4dde8fe commit c702282
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions moar.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"golang.org/x/term"

"github.com/walles/moar/m"
"github.com/walles/moar/textstyles"
"github.com/walles/moar/twin"
)

Expand Down Expand Up @@ -222,12 +223,12 @@ func parseStatusBarStyle(styleOption string) (m.StatusBarOption, error) {
return 0, fmt.Errorf("Good ones are inverse, plain and bold")
}

func parseUnprintableStyle(styleOption string) (m.UnprintableStyle, error) {
func parseUnprintableStyle(styleOption string) (textstyles.UnprintableStyleT, error) {
if styleOption == "highlight" {
return m.UNPRINTABLE_STYLE_HIGHLIGHT, nil
return textstyles.UNPRINTABLE_STYLE_HIGHLIGHT, nil
}
if styleOption == "whitespace" {
return m.UNPRINTABLE_STYLE_WHITESPACE, nil
return textstyles.UNPRINTABLE_STYLE_WHITESPACE, nil
}

return 0, fmt.Errorf("Good ones are highlight or whitespace")
Expand Down Expand Up @@ -416,7 +417,7 @@ func main() {
noClearOnExit := flagSet.Bool("no-clear-on-exit", false, "Retain screen contents when exiting moar")
statusBarStyle := flagSetFunc(flagSet, "statusbar", m.STATUSBAR_STYLE_INVERSE,
"Status bar style: inverse, plain or bold", parseStatusBarStyle)
unprintableStyle := flagSetFunc(flagSet, "render-unprintable", m.UNPRINTABLE_STYLE_HIGHLIGHT,
unprintableStyle := flagSetFunc(flagSet, "render-unprintable", textstyles.UNPRINTABLE_STYLE_HIGHLIGHT,
"How unprintable characters are rendered: highlight or whitespace", parseUnprintableStyle)
scrollLeftHint := flagSetFunc(flagSet, "scroll-left-hint",
twin.NewCell('<', twin.StyleDefault.WithAttr(twin.AttrReverse)),
Expand Down

0 comments on commit c702282

Please sign in to comment.