Skip to content

Commit b852602

Browse files
fix backspace in whitespace at front of line killing line
--HG-- branch : scroll-frontend
1 parent 447623d commit b852602

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/scrollfrontend/manual_readline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def backspace(cursor_offset, line):
8181
if not line[:cursor_offset].strip(): #if just whitespace left of cursor
8282
front_white = len(line[:cursor_offset]) - len(line[:cursor_offset].lstrip())
8383
to_delete = ((front_white - 1) % INDENT) + 1
84-
return cursor_offset - to_delete, line[:to_delete]
84+
return cursor_offset - to_delete, line[:to_delete] + line[cursor_offset:]
8585
return (cursor_offset - 1,
8686
line[:cursor_offset - 1] + line[cursor_offset:])
8787

0 commit comments

Comments
 (0)