X Tutup
Skip to content

Commit 63cbf14

Browse files
filenames suggestions only show after tab
1 parent 7ebdd92 commit 63cbf14

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bpython/line.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def current_string(cursor_offset, line):
4444
based on previous lines in the buffer"""
4545
for m in re.finditer('''(?P<open>(?:""")|"|(?:''\')|')(?:((?P<closed>.*?)(?P=open))|(?P<unclosed>.*))''', line):
4646
i = 3 if m.group(3) else 4
47-
if m.start(i) <= cursor_offset and m.end(i) >= cursor_offset:
47+
if m.start(i) < cursor_offset and m.end(i) >= cursor_offset:
4848
return m.start(i), m.end(i), m.group(i)
4949
return None
5050

bpython/repl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,11 +646,11 @@ def complete(self, tab=False):
646646
elif self.matches_iter.current_word == matches[0]:
647647
self.matches_iter.clear()
648648
return False
649-
return True
649+
return completer.shown_before_tab
650650

651651
else:
652652
assert len(matches) > 1
653-
return True
653+
return tab or completer.shown_before_tab
654654

655655
def format_docstring(self, docstring, width, height):
656656
"""Take a string and try to format it into a sane list of strings to be

0 commit comments

Comments
 (0)
X Tutup