X Tutup
Skip to content

Commit d2db693

Browse files
Merge pull request #391 from wwwjfy/delete-word-back-on-empty
consistent return for delete_word_from_cursor_back
2 parents 9def303 + 882c1f3 commit d2db693

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/curtsiesfrontend/manual_readline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def titlecase_next_word(cursor_offset, line):
268268
def delete_word_from_cursor_back(cursor_offset, line):
269269
"""Whatever my option-delete does in bash on my mac"""
270270
if not line:
271-
return cursor_offset, line
271+
return cursor_offset, line, ''
272272
starts = [m.start() for m in list(re.finditer(r'\b\w', line)) if m.start() < cursor_offset]
273273
if starts:
274274
return starts[-1], line[:starts[-1]] + line[cursor_offset:], line[starts[-1]:cursor_offset]

0 commit comments

Comments
 (0)
X Tutup