We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18a630d commit df0131dCopy full SHA for df0131d
bpython/scrollfrontend/manual_readline.py
@@ -79,9 +79,9 @@ def backspace(cursor_offset, line):
79
if cursor_offset == 0:
80
return cursor_offset, line
81
if not line[:cursor_offset].strip(): #if just whitespace left of cursor
82
- front_white = len(line[:cursor_offset]) - len(line[:cursor_offset].lstrip())
83
- to_delete = ((front_white - 1) % INDENT) + 1
84
- return cursor_offset - to_delete, line[:to_delete] + line[cursor_offset:]
+ #front_white = len(line[:cursor_offset]) - len(line[:cursor_offset].lstrip())
+ to_delete = ((cursor_offset - 1) % INDENT) + 1
+ return cursor_offset - to_delete, line[:cursor_offset - to_delete] + line[cursor_offset:]
85
return (cursor_offset - 1,
86
line[:cursor_offset - 1] + line[cursor_offset:])
87
0 commit comments