Avoid leaving selected item index past end of matches list

Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
f5af5f7334Julia committed on 10/10/2023, 1:27:18 PMparent354882f
1 file changedLine totals unavailable