natecraddock / zf

a commandline fuzzy finder and zig package designed for filtering filepaths
MIT License
451 stars 14 forks source link

bug: panic when selecting next line down (0 matches) #56

Closed ezradiniz closed 8 months ago

ezradiniz commented 8 months ago

How to reproduce?

1) git ls-files | zf 2) type anything that doesn't match (ex: asdfasdfasdf) 3) Select next line down (ex: ctrl-n)

Output:

> asdfasdfthread 60328 panic: integer overflow                                                                                                                            0/25
/home/ezra/dev/zf/src/ui.zig:552:39: 0x2532b4 in lineDown (zf)
    if (state.selected < visible_rows - 1) {
                                      ^