Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 87a5559

Browse files
committed
delete word when it ends with word separators: .,(
1 parent 253581e commit 87a5559

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

bipython/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,10 @@ def keypress(self, size, key):
451451
# slitting on space
452452
np = max(
453453
line.rfind(' ', 0, p),
454-
line.rfind('.', 0, p),
455-
line.rfind('(', 0, p),
456-
line.rfind('=', 0, p)
457-
)
454+
line.rfind('.', 0, p-1),
455+
line.rfind('(', 0, p-1),
456+
line.rfind('=', 0, p-1)
457+
) + 1
458458
if np == -1:
459459
line = line[p:]
460460
np = 0

0 commit comments

Comments
 (0)