diff --git a/.travis.yml b/.travis.yml index 02853d77..adc2c4ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ env: - TOXENV=py33 - TOXENV=py34 - TOXENV=pypy - - TOXENV=pypy3 install: - travis_retry pip install tox script: diff --git a/ptpython/key_bindings.py b/ptpython/key_bindings.py index 38186891..9cfceb64 100644 --- a/ptpython/key_bindings.py +++ b/ptpython/key_bindings.py @@ -105,14 +105,13 @@ def at_the_end(b): elif at_the_end(b) and b.document.text.replace(' ', '').endswith( '\n' * (empty_lines_required - 1)): - if b.validate(): - # When the cursor is at the end, and we have an empty line: - # drop the empty lines, but return the value. - b.document = Document( - text=b.text.rstrip(), - cursor_position=len(b.text.rstrip())) - - b.accept_action.validate_and_handle(event.cli, b) + # When the cursor is at the end, and we have an empty line: + # drop the empty lines, but return the value. + b.document = Document( + text=b.text.rstrip(), + cursor_position=len(b.text.rstrip())) + + b.accept_action.validate_and_handle(event.cli, b) else: auto_newline(b)