primitivus: save the input history when "esc" is pressed

This commit is contained in:
souliane 2013-11-25 12:29:14 +01:00
commit 3dc0d6ac39

View file

@ -140,6 +140,8 @@ class EditBar(sat_widgets.ModalEdit):
self.set_edit_pos(len(text))
if key == "esc":
# first save the text to the current mode, then change to NORMAL
self.app._updateInputHistory(self.get_edit_text(), mode=self.mode)
self.app._updateInputHistory(mode='NORMAL')
if self._mode == 'NORMAL' and key in self._modes:
self.app._updateInputHistory(mode=self._modes[key][0])