doxdocgen
doxdocgen copied to clipboard
Problem with multiple cursors, doesn't add comments for all functions.
Description
When I create multiple cursors before 2 or more functions using Alt+Click, it doesn't put help comments before them. Instead, it creates help comment before the first function when I create a cursor and then move down in file to create another cursor. It doesn't create any help comment if I move up to create second cursor, after creating first cursor.
Example
void first(){}
void second(){}
If I press Alt+Click before void first(), then before void second() and type /** <enter> the output comes as
/**
* @brief
*
*/
void first(){}
/**
*
void second(){}
If I press Alt+Click before void second(), and then before void first() and type /** <enter> the output comes as
/**
*
void first(){}
/**
*
void second(){}
Expected result in either case is
/**
* @brief
*
*/
void first(){}
/**
* @brief
*
*/
void second(){}
Hi @80avin ,
this is a great feature request and thank you for the detailed description! I took a quick look at it and the reason for that behavior is mostly because the runtime of VS Code sends different data when there are multiple cursors instead of one. The internal processing of VS Code with multiple cursors does first the action of updating the cursor position and the triggering the addons whereas with a single cursor it's done the other way around (the addon currently relies on the second way). I think it should be fairly simply to have the addon check also the next line for a comment trigger sequence but it will take some time to make sure it doesn't break the functionality of a single cursor.