Open markyoung2u opened 5 months ago
Looking at the current code, when this option is enabled, it tries to find the path relative to the project root. If it can't find the project the file is part of then it just outputs the file name. I guess a better option here would be to include the absolute (full) path if a relative one can't be determined.
Does that sound like a suitable solution?
It would be better when "Include path to file" is True that the full path be used regardless of it being found in a project or not. Your code should be simpler, and would work as advertised. Right now it does not work. Doing it halfway is not really a solution, is it?
The details of why it was originally implemented (#4) the way it was are vague. Having absolute paths can cause potential issues with shared code bases as the code may be checked out to different paths or even different drives. Having absolute paths doesn't feel like a perfect solution as one of the original aims for this extension was to help people working with existing code bases that they're not familiar with and such people are more likely to be in a position where absolute paths don't help.
I'm going to do two things:
OK, I understand, Seems fine
VS 2022: Tools, Options, Comment Links, Include path to file can be true or false but nothing changes. The help indicates "if set to True, links generated with the context menu will include the path to the file." but it does not work for any of the 3 menu items. If I mark a word, right-click, Comment Links, Copy link to Selection, I get links without the path? link:work.txt:errorcodes link:smMsgs.h:errSelRsv