tyru / current-func-info.vim

Get current function name
http://www.vim.org/scripts/script.php?script_id=3197
62 stars 14 forks source link

[C] Function wrongly detected #5

Closed jonthn closed 11 years ago

jonthn commented 12 years ago

In a code like this :

#include <stdio.h>                                                                   
#include <stdlib.h>                                                                  

struct ooo {                                                                         
  int a;                                                                             
};                                                                                   

int function()                                                                       
{                                                                                    
  return 0;                                                                          
}                                                                                    

int main(int argc, char **argv)                                                      
{                                                                                    
  struct ooo my_ooo;                                                                 

  my_ooo.a = 1;                                                                      

  return EXIT_SUCCESS;                                                               
}

when I place the cursor on the ";" after struct foo I get for the function name : "function()" which is obviously incorrect.

tyru commented 11 years ago

Sorry for long, long time to work on this issue. It may be fixed.

(and maybe drastically faster than when you posted this issue...)