nvim-telescope / telescope-live-grep-args.nvim

Live grep with args
726 stars 40 forks source link

Fix `nil` Assignment to `frag` causing errors in subsequent logic execution. #81

Open NGPONG opened 5 months ago

NGPONG commented 5 months ago

This is a simple modification. The variable frag is occasionally set to nil, which disrupts the execution of subsequent logic, such as current_arg .. frag. When this issue occurs, a vexing error window appears. I earnestly hope this can be rectified. While this may not be the most optimal solution, there might be more effective alternatives. Regardless, I am more than willing to collaborate fully to support your efforts in resolving this matter.

closes #73

weeman1337 commented 5 months ago

Thank you for your contribution @NGPONG :hugs:

Do you in what case frag is nil? Can you give an example?

NGPONG commented 5 months ago

Hey @weeman1337 , thanks for the reply! I'm sorry I can't give you an answer right now, as you can see this commit is six months old! But I'm pretty sure it does happen, because I haven't had this error here since the last commit of this branch. Anyway, I'll switch back to the original branch and continue using it for a while to try to reproduce the problem.

Regards!

NGPONG commented 5 months ago

Hey @weeman1337 , thanks for the reply! I'm sorry I can't give you an answer right now, as you can see this commit is six months old! But I'm pretty sure it does happen, because I haven't had this error here since the last commit of this branch. Anyway, I'll switch back to the original branch and continue using it for a while to try to reproduce the problem.

Regards!

@weeman1337 Here is a video that reproduces the problem. The erros is triggered when ' and " appear at the end of the prompt string.

https://github.com/nvim-telescope/telescope-live-grep-args.nvim/assets/38415769/b866d618-5cfd-43dc-90f5-3f3f7bb354a8

NGPONG commented 4 months ago

In order to fix some other issues 9222cc169524ea7ec7c17402ad3b19419ccb7b99, I have submitted some changes related to this PR. I apologize for that. I will revert it out when finalizing the confirmation.

weeman1337 commented 3 months ago

Okay, so this PR does now more than only fix the nil issue, right? Can you clean it up to only fix the specific issue and create other PRs for the rest @NGPONG ?