Fix bugs with code completion on REPL
@@ -30,6 +30,10 @@ def __repl_raw_input__(prompt=None):
current_thread = threading.current_thread()
+ ConsoleViewController.visible.suggestions = []
+ ConsoleViewController.visible.completions = []
+ ConsoleViewController.visible.reloadSuggestions()
+
__isREPLAskingForInput__ = True
Python.shared.isREPLAskingForInput = True
@@ -79,12 +83,13 @@ def __repl_raw_input__(prompt=None):
result = input(prompt)
except Exception as e:
exc = e
- finally:
+
__isREPLAskingForInput__ = False
Python.shared.isREPLAskingForInput = False
if __platform__ is iOS and ConsoleViewController.visible != None:
ConsoleViewController.visible.suggestions = []
ConsoleViewController.visible.completions = []
+ ConsoleViewController.visible.reloadSuggestions
if exc != None:
raise exc
