Skip to content

Conversation

@nicula-stripe
Copy link

Reproducing the bug

  • Apply the following patch on a clean master:
diff --git a/example/cli/main.go b/example/cli/main.go
index 7b9b8d2..3baf694 100644
--- a/example/cli/main.go
+++ b/example/cli/main.go
@@ -29,7 +29,8 @@ func main() {
                slice,
                func(i int) string {
                        return slice[i]
-               })
+               },
+               fuzzyfinder.WithHeader("header"))
        if err != nil {
                log.Fatal(err)
        }
  • Run printf 'a\nb\nc\nd\ne\nf' | go run example/cli/main.go.
  • Reduce the height of the terminal such that not all items fit on the screen.
  • Scroll all the way up in the list and notice how the cursor is one position above what you can actually see. Demo:
bug.mov

Fixing the bug

If the prompt has a header, increment the number of already-occupied lines (the other ones being the line with the search input, and the line with the result count).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant