Commit 80ed524e authored by Piergiorgio Pancino's avatar Piergiorgio Pancino

Merge branch 'fix_#633' into 'master'

Fix #633

Closes #633

See merge request !1170
parents 564d727c d563ed0a
......@@ -30,7 +30,7 @@ class TypingHelper(object):
return s.lstrip("-").replace(".", "", 1).isdigit()
def add_helper_key_binding(self, repl):
@repl.add_key_binding(" ")
@repl.add_key_binding(" ", filter=has_focus(DEFAULT_BUFFER))
def _(event):
"""
add '(' and ',' instead of 'space' if appropriate in the command-line current context
......
......@@ -63,6 +63,23 @@ def test_shell_noexit(clean_gevent):
assert result == "print(1,2)"
def test_shell_ctrl_r(clean_gevent):
clean_gevent["end-check"] = False
result, cli, br = _feed_cli_with_input(
chr(0x12) + "bla blub\r\r", check_line_ending=True
)
assert result == ""
result, cli, br = _feed_cli_with_input(
"from bliss import setup_globals\rfrom subprocess import Popen\r"
+ chr(0x12)
+ "from bl\r\r",
check_line_ending=True,
)
assert result == "from bliss import setup_globals"
def test_shell_prompt_number(clean_gevent):
clean_gevent["end-check"] = False
result, cli, br = _feed_cli_with_input("print 1\r")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment