@@ -406,7 +406,7 @@ def proccess_control_event(self, e):
406
406
if self .stdin .has_focus :
407
407
self .stdin .process_event (ee )
408
408
else :
409
- self .process_simple_event (ee )
409
+ self .process_simple_keypress (ee )
410
410
self .update_completion ()
411
411
412
412
elif self .stdin .has_focus :
@@ -596,7 +596,7 @@ def only_whitespace_left_of_cursor():
596
596
or self .matches_iter .next ()
597
597
self .cursor_offset , self .current_line = self .matches_iter .cur_line ()
598
598
599
- def process_simple_event (self , e ):
599
+ def process_simple_keypress (self , e ):
600
600
if e in (u"<Ctrl-j>" , u"<Ctrl-m>" , u"<PADENTER>" ):
601
601
self .on_enter ()
602
602
while self .fake_refresh_requested :
@@ -618,7 +618,7 @@ def send_current_block_to_external_editor(self, filename=None):
618
618
self .clear_current_block ()
619
619
with self .in_paste_mode ():
620
620
for e in events :
621
- self .process_simple_event (e )
621
+ self .process_simple_keypress (e )
622
622
self .current_line = ''
623
623
self .cursor_offset = len (self .current_line )
624
624
@@ -655,7 +655,12 @@ def add_normal_character(self, char):
655
655
self .cursor_offset = max (0 , self .cursor_offset - 4 )
656
656
657
657
def update_completion (self , tab = False ):
658
- """Update autocomplete info; self.matches_iter and self.argspec"""
658
+ """Update visible docstring and matches, and possibly hide/show completion box"""
659
+ #Update autocomplete info; self.matches_iter and self.argspec
660
+ #Should be called whenever the completion box might need to appear / dissapear
661
+ # * when current line changes, unless via selecting a match
662
+ # * when cursor position changes
663
+ # *
659
664
self .list_win_visible = BpythonRepl .complete (self , tab )
660
665
#look for history stuff
661
666
@@ -1047,13 +1052,6 @@ def __repr__(self):
1047
1052
s += '>'
1048
1053
return s
1049
1054
1050
- ## Provided for bpython.repl.Repl
1051
- def _get_current_line (self ):
1052
- return self ._current_line
1053
- def _set_current_line (self , line ):
1054
- self ._current_line = line
1055
- current_line = property (_get_current_line , _set_current_line , None ,
1056
- "The current line" )
1057
1055
def echo (self , msg , redraw = True ):
1058
1056
"""
1059
1057
Notification that redrawing the current line is necessary (we don't
0 commit comments