Fix 2349 - Bug with file history for file outside of the solution

Created a separate set of commands to handle the case when command was triggered by clicking on the tab    or code window