Open powercode opened 9 years ago
I think I fixed this in V5 - and pass it as the third parameter, if you try the Nov WMF preview, it should have the fix. But I'm not sure TabExpansion++ can pass it - maybe if it wrapped every native argument completer and registered the wrapped script block instead.
So the completers could we written to detect if they get a third parameter, or else fallback to legacy mode? So it would work good on new powershell versions but not on < 4.0?
I'm fine with that...
When writing native argument completers, it is necessary to know the cursor position.
What is the kosher way of getting it? It is not passed as a parameter, but exists in the parent scope. Would things break if we started passing this as a third parameter to the native completers? param($wordToComplete, $commandAst, $cursorColumn)
Or is it ok to just expect it to be there in the parent scope?