Fix showing of previous history entry with non-default_prev

This commit is contained in:
Anthony Sottile
2019-12-07 12:04:26 -08:00
parent 78934d13be
commit 35f60540b5
2 changed files with 13 additions and 1 deletions

View File

@@ -1541,6 +1541,18 @@ def test_save_via_command_mode(tmpdir):
assert f.read() == 'hello world\n'
def test_repeated_command_mode_does_not_show_previous_command(tmpdir):
f = tmpdir.join('f')
with run(str(f)) as h, and_exit(h):
h.press('ohai')
trigger_command_mode(h)
h.press_and_enter(':w')
trigger_command_mode(h)
h.await_text_missing(':w')
h.press('Enter')
def test_write_and_quit(tmpdir):
f = tmpdir.join('f')