Add a suffix to temporary files when composing toot in an editor
This enable suffix-based configuration in your editor when editing toots. Closes #219
This commit is contained in:
parent
89585b6761
commit
5c2f9dcf7c
|
@ -102,7 +102,7 @@ def editor_input(editor, initial_text):
|
|||
"""Lets user input text using an editor."""
|
||||
initial_text = (initial_text or "") + EDITOR_INPUT_INSTRUCTIONS
|
||||
|
||||
with tempfile.NamedTemporaryFile() as f:
|
||||
with tempfile.NamedTemporaryFile(suffix='.toot') as f:
|
||||
f.write(initial_text.encode())
|
||||
f.flush()
|
||||
|
||||
|
|
Loading…
Reference in New Issue