fix cursor moves when file listing is empty