Skip to content

Commit

Permalink
Close pager pipe when we're done sending input
Browse files Browse the repository at this point in the history
If we exit 'zb' without closing the STDIN pipe to a pager that is in use
the pager may not quit as it will be waiting for more input from us.
  • Loading branch information
msp301 committed May 20, 2024
1 parent a08c206 commit 2927a19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/outline.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ var outlineCmd = &cobra.Command{
}

go func() {
defer pipe.Close()

book().Notes.Walk(func(vertex graph.Vertex, depth int) bool {
indent := strings.Repeat("\t", depth)
switch val := vertex.Properties["Value"].(type) {
Expand Down

0 comments on commit 2927a19

Please sign in to comment.