Use a specific 'qutebrowser_editor_' prefix for <C-e> instead of 'tmp'.
Why does this matter? In my vimrc I have this: " When using dwb <C-e>; assume markdown, and don't store in viminfo since these are " temporary files autocmd BufRead,BufNewFile /home/martin/.cache/dwb/edit* setlocal ft=markdown viminfo= I would like to do the same with qutebrowser, but this is not possible with a file name like '/tmp/tmpSJsgSG4'
This commit is contained in:
parent
534dbfc4c2
commit
c76221c14e
@ -122,7 +122,8 @@ class ExternalEditor(QObject):
|
|||||||
raise ValueError("Already editing a file!")
|
raise ValueError("Already editing a file!")
|
||||||
self._text = text
|
self._text = text
|
||||||
try:
|
try:
|
||||||
self._oshandle, self._filename = tempfile.mkstemp(text=True)
|
self._oshandle, self._filename = tempfile.mkstemp(text=True,
|
||||||
|
prefix='qutebrowser_editor_')
|
||||||
if text:
|
if text:
|
||||||
encoding = config.get('general', 'editor-encoding')
|
encoding = config.get('general', 'editor-encoding')
|
||||||
with open(self._filename, 'w', encoding=encoding) as f:
|
with open(self._filename, 'w', encoding=encoding) as f:
|
||||||
|
Loading…
Reference in New Issue
Block a user