Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e4db2b3

Browse filesBrowse files
whitespace changes
1 parent 6236073 commit e4db2b3
Copy full SHA for e4db2b3

1 file changed

+5-3Lines changed: 5 additions & 3 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎bpython/curtsiesfrontend/repl.py‎

Copy file name to clipboardExpand all lines: bpython/curtsiesfrontend/repl.py
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ def only_whitespace_left_of_cursor():
397397
if not self.config.auto_display_list and not self.list_win_visible:
398398
return True #TODO why?
399399
cw = self.current_string() or self.current_word
400+
logging.debug('current string: %r', self.current_string())
401+
logging.debug('current word: %r', self.current_word)
400402
if not cw:
401403
return
402404

@@ -628,19 +630,19 @@ def lines_for_display(self):
628630
@property
629631
def current_word(self):
630632
"""Returns the "current word", based on what's directly left of the cursor.
631-
examples inclue "socket.socket.metho" or "self.reco" or "yiel"
633+
examples inclue "socket.socket.metho" or "self.reco" or "yiel"
632634
633635
cw() is currently an alias, but cw() is used by bpyton.repl.Repl
634636
so must match its definition of current word - changing how it behaves
635637
has many repercussions.
636638
"""
637-
639+
638640
start, end, word = self._get_current_word()
639641
return word
640642

641643
def _get_current_word(self):
642644
pos = self.cursor_offset_in_line
643-
645+
644646
matches = list(re.finditer(r'[\w_][\w0-9._]*[(]?', self._current_line))
645647
start = pos
646648
end = pos

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.