Add :sort command

This commit is contained in:
Anthony Sottile
2020-01-06 09:23:53 -08:00
parent 083417399e
commit 180ff20be5
4 changed files with 85 additions and 11 deletions

View File

@@ -143,3 +143,14 @@ def and_exit(h):
if ' *' in h.get_screen_line(0):
h.press('n')
h.await_exit()
def trigger_command_mode(h):
# in order to enter a steady state, trigger an unknown key first and then
# press escape to open the command mode. this is necessary as `Escape` is
# the start of "escape sequences" and sending characters too quickly will
# be interpreted as a single keypress
h.press('^J')
h.await_text('unknown key')
h.press('Escape')
h.await_text_missing('unknown key')