if there is no current selection then use the whole file
Merge pull request #1 from mneedham/master

If nothing selected use contents of file