Skip to content

Commit 5b5730b

Browse files
committed
hide completion window when paste mode detected
1 parent 0763cc7 commit 5b5730b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bpython/cli.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,12 @@ def complete(self, tab=False):
523523
since there can be several reasons why it won't be displayed; this
524524
makes it more manageable."""
525525

526+
if self.paste_mode and self.list_win_visible:
527+
self.scr.touchwin()
528+
529+
if self.paste_mode:
530+
return
531+
526532
if self.list_win_visible and not OPTS.auto_display_list:
527533
self.scr.touchwin()
528534
self.list_win_visible = False
@@ -1422,8 +1428,7 @@ def addstr(self, s):
14221428
l = len(self.s)
14231429
self.s = self.s[:l - self.cpos] + s + self.s[l - self.cpos:]
14241430

1425-
if not self.paste_mode:
1426-
self.complete()
1431+
self.complete()
14271432

14281433
def print_line(self, s, clr=False, newline=False):
14291434
"""Chuck a line of text through the highlighter, move the cursor

0 commit comments

Comments
 (0)