How come it works? e.g. how comes the first tag is always the struct and the second the typedef?
It works because tags are sorted in the order "name, line_number, ...". tm_workspace_find() will preserve this order so for
typedef struct Foo {
} Foo;
we can be sure the first Foo is struct and the second is typedef. It won't work just for the single-line ones but I think these won't be very common for structs/unions/etc.
... Maybe something around the lines of "prefer a tag not on the current line" or something?
Good point, will have a look at it.
—
Reply to this email directly or view it on GitHub.