[Ide] Fix global command search

The search now includes commands which are valid
in the currently active pad or document.