Skip to content

Commit

Permalink
OpenEditorAction: Add underscore before name
Browse files Browse the repository at this point in the history
This makes it easier to see which file one is editing even via this
temporary file.

Fixes #442
  • Loading branch information
sils committed Apr 15, 2015
1 parent 277c4c0 commit 9258024
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion coalib/results/result_actions/OpenEditorAction.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def apply(self, result, original_file_dict, file_diff_dict, editor: str):

# Prefix is nice for the user so he has an indication that its the
# right file he's editing
temphandle, tempname = tempfile.mkstemp(os.path.basename(filename))
temphandle, tempname = tempfile.mkstemp(
"_" + os.path.basename(filename))
os.close(temphandle)
with open(tempname, "w") as temphandle:
temphandle.writelines(current_file)
Expand Down

1 comment on commit 9258024

@fneu
Copy link
Contributor

@fneu fneu commented on 9258024 Apr 15, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

Please sign in to comment.