mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-29 04:35:54 -04:00
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."""
|
"""Lets user input text using an editor."""
|
||||||
initial_text = (initial_text or "") + EDITOR_INPUT_INSTRUCTIONS
|
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.write(initial_text.encode())
|
||||||
f.flush()
|
f.flush()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user