Skip to content

Commit fc74d87

Browse files
fix key_right bug
1 parent 4e654ef commit fc74d87

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bpython/curtsies.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
from bpython.translations import _
1717
from bpython.importcompletion import find_iterator
1818

19+
repl = None # global for `from bpython.curtsies import repl`
20+
#WARNING Will be a problem if more than one repl is ever instantiated this way
21+
1922
def main(args=None, locals_=None, banner=None):
2023
config, options, exec_args = bpargs.parse(args, (
2124
'scroll options', None, [
@@ -69,6 +72,7 @@ def event_or_refresh(timeout=None):
6972
else:
7073
yield input_generator.send(timeout)
7174

75+
global repl # global for easy introspection `from bpython.curtsies import repl`
7276
with Repl(config=config,
7377
locals_=locals_,
7478
request_refresh=request_refresh,
@@ -79,7 +83,6 @@ def event_or_refresh(timeout=None):
7983
interactive=interactive,
8084
orig_tcattrs=input_generator.original_stty) as repl:
8185
repl.height, repl.width = window.t.height, window.t.width
82-
sys.repl = repl
8386

8487
def process_event(e):
8588
"""If None is passed in, just paint the screen"""

0 commit comments

Comments
 (0)