Skip to content

Highlighting doesn't seem to work when combining glow with gum pager #509

@jessejenks

Description

@jessejenks

Describe the bug
Highlighting doesn't appear to work when using gum pager as the pager for glow.

To Reproduce
Open file

PAGER="gum pager" glow README.md --pager

and then try to search (/)

Possibly related issue. I don't know if this is even supported behavior, but trying to search after running this

glow README.md | gum pager

causes a panic runtime error: slice bounds out of range [13:10]

but

glow README.md | less -r

works fine.

Expected behavior
Match highlighting style works similar to less.

Screenshots

Using default less -r

glow -s dark --pager README.md

and then /o|d, I get the following.

less-matches

Doing the same thing with gum pager

PAGER="gum pager" glow -s dark --pager README.md
gum-matches

Desktop:

  • OS: Mac OS X Sonoma 14.3.1
  • Terminal: built in Terminal.app
  • Version
    • gum version 0.13.0
    • glow version 1.5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions