Skip to content

Commit e9bdd06

Browse files
more notes
1 parent 26eccbd commit e9bdd06

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,7 @@ def __init__(self, locals_=None, config=None, request_refresh=lambda: None, bann
165165
interp = code.InteractiveInterpreter(locals=locals_)
166166
if banner is None:
167167
banner = _('welcome to bpython')
168-
169168
config.autocomplete_mode = SIMPLE # only one implemented currently
170-
171169
if config.cli_suggestion_width <= 0 or config.cli_suggestion_width > 1:
172170
config.cli_suggestion_width = 1
173171

@@ -198,14 +196,15 @@ def smarter_request_refresh():
198196
# length goes over what the terminal width
199197
# was at the time of original output
200198
self.history = [] # this is every line that's been executed;
201-
# it gets smaller on rewind
199+
# it gets smaller on rewind
202200
self.display_buffer = [] # formatted version of lines in the buffer
203201
# kept around so we can unhighlight parens
204202
# using self.reprint_line as called by
205203
# bpython.Repl
206-
self.scroll_offset = 0
204+
self.scroll_offset = 0 # how many times display has been scrolled down
205+
# because there wasn't room to display everything
207206
self.cursor_offset_in_line = 0 # from the left, 0 means first char
208-
self.done = True
207+
self.done = True # whether the current block is finished yet
209208

210209
self.coderunner = CodeRunner(self.interp, request_refresh)
211210
self.stdout = FakeOutput(self.coderunner, self.send_to_stdout)

0 commit comments

Comments
 (0)