We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b5730b commit dc8f93dCopy full SHA for dc8f93d
1 file changed
bpython/cli.py
@@ -518,6 +518,14 @@ def getargspec(func):
518
519
return getargspec(func)
520
521
+ def check(self):
522
+ """Check if paste mode should still be active and, if not, deactivate
523
+ it and force syntax highlighting."""
524
+
525
+ if self.paste_mode and time.time() - self.last_key_press > 0.01:
526
+ self.paste_mode = False
527
+ self.print_line(self.s)
528
529
def complete(self, tab=False):
530
"""Wrap the _complete method to determine the visibility of list_win
531
since there can be several reasons why it won't be displayed; this
@@ -1821,6 +1829,7 @@ def idle(caller):
1821
1829
stdscr.nodelay(False)
1822
1830
curses.ungetch(key)
1823
1831
caller.statusbar.check()
1832
+ caller.check()
1824
1833
1825
1834
if DO_RESIZE:
1826
1835
do_resize(caller)
0 commit comments