Reply To: How to handle files without an extension in Vcs Package…?

Product Compare Forums Multi-Edit Support How to handle files without an extension in Vcs Package…? Reply To: How to handle files without an extension in Vcs Package…?

#5113
Michal Vodicka
Participant

I presumed VCS doesn’t change current window which was of course wrong. It probably creates some temporary buffer which is active during command line processing. Looking to code it seems using vcsFName variable is correct solution.

It would be better to rename macro to something less generic to emphasize it works for VCS only; for example GetDotExtVcs(). And also improve traces to print used file name to allow easy debugging. Something like:

[code:fvia4m2f] TTRACE_ENTER("Test", TDBG_DEBUG, "GetDotExtVcs() [\"%s\"]", vcsFName); [/code:fvia4m2f]

But the best thing which would allow to write better metacommand macros is to change TranslateCmdLine() implementation to allow nested expansion so <@macro /F=<FILE>.<EXT>> would work as expected. Or at least make it implicit and pass current file name as a parameter to every such a macro. I mean to change MEW base; change on user side is pointless because the goal is to avoid the need to change MEW sources :)