nvim-telescope / telescope-fzf-native.nvim

FZF sorter for telescope written in c
1.38k stars 45 forks source link

Segfault when searching for branch with Polish characters #11

Closed sethidden closed 3 years ago

sethidden commented 3 years ago

Repro:

git clone https://github.com/nvim-telescope/telescope-fzf-native.nvim
git checkout -b feature/PoprawićPaginacjeWPłatnościach #create the branch that will make fzf segfault when searched for
nvim
:Telescope git_branches
feature/PoprawićPaginacjeWPłatnościach #you can either paste or write this in the Telescope input box - it's easeier to paste

It segfaults on the second special character - the 'ł" in "Płatnościach" if you write it by hand nETkJe076l

Commenting out require('telesccope').load_extension('fzf') in my config fixes the issue.

sethidden commented 3 years ago

Looks like it happens for hyphens also:

git checkout -b feature/1337-some-times-branches-have-lots-of-hyphens
:Telescope git_branches
#try to re-type the full branch name

0JgOGLcv3z

Conni2461 commented 3 years ago

Thanks for reporting.

I will look into it but i am currently also reworking how utf8 characters work. https://github.com/nvim-telescope/telescope-fzf-native.nvim/pull/10 (i have more work done locally) so you can lowercase and normalize them.

Example: I have a Ö somewhere and i want to be able to match it with ö (lowercase) and o (normalize).

fzf does both things and i am currently working to bring this feature to this fork as well :) (normalize will be configurable, enable/disable)

Conni2461 commented 3 years ago

It was not a unicode issue. I hope i fixed it. Thanks for the detailed bug report :)

sethidden commented 3 years ago

Just remembered I need to update nvim plugins after I segfaulted again.

The segfault doesn't happen anymore after I downloaded the newest version with your fix. Thanks!