# HG changeset patch # User souliane # Date 1385378954 -3600 # Node ID e867f146d49fecf20d15e48911dfe4d4e21c2680 # Parent 378af36155c2620b0866111888e04ad917eb1b61 primitivus: save the input history when "esc" is pressed diff -r 378af36155c2 -r e867f146d49f frontends/src/primitivus/primitivus --- a/frontends/src/primitivus/primitivus Mon Nov 25 01:56:07 2013 +0100 +++ b/frontends/src/primitivus/primitivus Mon Nov 25 12:29:14 2013 +0100 @@ -140,6 +140,8 @@ 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])