Open jpalus opened 2 years ago
Reproduces for me with:
$ mkdir test-git
$ cd test-git
$ git init
# create file with name long enough relative to window width
$ echo test > $(printf 'f%.0s' `seq $(($(tput cols) - 10))`).txt
$ git status | fpp
# try to select file with 'F'
Entries which end close to window border
PathPicker
cause infinite loop after trying to select them with eitherf
orF
.Following
for
loop is affected: https://github.com/facebook/PathPicker/blob/cc032b2b2fa2fa8ab2fedc93766b2bf2303781d2/src/pathpicker/screen_control.py#L668-L673Seemingly due to reaching this code path: https://github.com/facebook/PathPicker/blob/cc032b2b2fa2fa8ab2fedc93766b2bf2303781d2/src/pathpicker/line_format.py#L300-L306
Which apparently keeps adding dirty indexes forever: https://github.com/facebook/PathPicker/blob/cc032b2b2fa2fa8ab2fedc93766b2bf2303781d2/src/pathpicker/line_format.py#L237-L238