diff options
Diffstat (limited to 'alot')
-rw-r--r-- | alot/commands/globals.py | 8 | ||||
-rw-r--r-- | alot/defaults/alot.rc | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py index 4d825b78..807bee69 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -167,16 +167,20 @@ class ExternalCommand(Command): #) class EditCommand(ExternalCommand): """opens editor""" - def __init__(self, path, spawn=None, **kwargs): + def __init__(self, path, spawn=None, thread=None, **kwargs): self.path = path if spawn != None: self.spawn = spawn else: self.spawn = settings.config.getboolean('general', 'spawn_editor') + if thread != None: + self.thread = thread + else: + self.thread = settings.config.getboolean('general', 'editor_in_thread') editor_cmd = settings.config.get('general', 'editor_cmd') ExternalCommand.__init__(self, editor_cmd, path=self.path, - spawn=self.spawn, thread=self.spawn, + spawn=self.spawn, thread=self.thread, **kwargs) diff --git a/alot/defaults/alot.rc b/alot/defaults/alot.rc index 9fb80449..956e0409 100644 --- a/alot/defaults/alot.rc +++ b/alot/defaults/alot.rc @@ -43,6 +43,11 @@ show_statusbar = True # use terminal_command to spawn a new terminal for the editor? spawn_editor = False +# call editor in separate thread. +# in case your editor doesn't run in the same window as alot, setting true here +# will make alot non-blocking during edits +editor_in_thread = False + # set terminal for asynchronous editing terminal_cmd = x-terminal-emulator -e |