diff --git a/diff.py b/diff.py index bbac877a..361aeff2 100644 --- a/diff.py +++ b/diff.py @@ -141,7 +141,11 @@ def run(self, edit): else: git_root_dir = "" - if not os.path.isfile(full_path_file_name): + if full_path_file_name is None + # If no path exists, this is a manual hunk editing diff + # fall back to default "Enter" command + self.view.run_command('insert', {'characters':'\n'}) + elif not os.path.isfile(full_path_file_name): caption = "Enter base directory for file '%s':" % self.file_name v.window().show_input_panel(caption, git_root_dir,