noborus / ov

🎑Feature-rich terminal-based text viewer. It is a so-called terminal pager.
https://noborus.github.io/ov
MIT License
1.49k stars 39 forks source link

Hangs in Git Bash (MINGW46) on Windows 10 #419

Open metakeule opened 1 year ago

metakeule commented 1 year ago

The pager hangs and does nothing e.g.

package main

import (
    "bytes"

    "github.com/noborus/ov/oviewer"
)

func main() {

    doc, err := oviewer.NewDocument()
    if err != nil {
        panic(err)
    }

    if err := doc.ReadAll(bytes.NewBufferString("hiho")); err != nil {
        panic(err)
    }

    ov, err := oviewer.NewOviewer(doc)
    if err != nil {
        panic(err)
    }
    if err := ov.Run(); err != nil {
        panic(err)
    }
}
noborus commented 1 year ago

I was able to confirm that the code shown works on windows 10, but I don't know the mingw environment. sorry.

metakeule commented 1 year ago

Sorry, meant Git Bash. To test: Just install Git with Git Bash on Windows and run the generated binary in Git Bash.

noborus commented 1 year ago

I tried to install it and it worked.

$ /mingw64/bin/git --version
git version 2.41.0.windows.3
$ file /c/Users/noborus/dev/bin/ov
/c/Users/noborus/dev/bin/ov: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows, 13 sections

ov-mingw64

noborus commented 1 year ago

Oops, sorry. The code above also worked. t