mattboehm / vim-unstack

Vim plugin for parsing stack traces and opening the files
286 stars 15 forks source link

Experience issues with UnstackFromClipboard #36

Closed Yinameah closed 4 years ago

Yinameah commented 4 years ago

Hello, First of all, thanks for your work on this plugin, I find it super useful.

But I think there is a bug with the regex for python traces. For exemple : File "/home/aurelien/sketchbook/GETS/gectesting/GECTestingSuite", line 3 <<<<<<< Updated upstream I copy this from integrated vim terminal, which result of this line in the register : File "/home/aurelien/sketchbook/GETS/gectesting/GECTestingSuite", line 3^J <<<<<<< Updated upstream^J

The ^J is the source of the problem. If the line doesn't end there, (ie, if there is a "in " after, the problem doesn't appear. And if the problem is in line 332, I'm sent in line 33. The regex in the vim-extension says : call add(extractors, unstack#extractors#Regex('\v^ *File "([^"]+)", line ([0-9]+).+', '\1', '\2')) I guess the .+ should be more of a .? or something, but I'm not super efficient with vim script and regex syntaxes, so despite spending some time on this, I didn't figure out how to make it work ...

mattboehm commented 4 years ago

Hi @Yinameah, sorry that this issue slipped through my radar!

I think you're right about the cause of this and just pushed a commit to the master branch that replaces the + with a ? for the Python/Ruby patterns.

Please try updating the plugin, and if you run into the issue again, be sure to let me know.

Thanks!

Yinameah commented 4 years ago

Hello,

Thank you very much for taking care of this. I updated the plugin and it seems to work as expected. Good job ;-)

Have a nice week.