Save key mode to leave

Doing self._prompt.question.done() already sets self._prompt to the next
prompt or to None.
This commit is contained in:
Florian Bruhin 2016-10-26 19:46:22 +02:00
parent 67cb3cd23e
commit bc4e340323

View File

@ -215,9 +215,9 @@ class PromptContainer(QWidget):
except Error as e:
raise cmdexc.CommandError(str(e))
if done:
key_mode = self._prompt.KEY_MODE
self._prompt.question.done()
modeman.maybe_leave(self._win_id, self._prompt.KEY_MODE,
':prompt-accept')
modeman.maybe_leave(self._win_id, key_mode, ':prompt-accept')
@cmdutils.register(instance='prompt-container', hide=True, scope='window',
modes=[usertypes.KeyMode.yesno],