if there is no current selection then use the whole file