fix DWIM behaviour for file-edit