We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd3b707 commit 8ce1746Copy full SHA for 8ce1746
bpython/cli.py
@@ -186,6 +186,15 @@ def readline(self):
186
try:
187
while True:
188
key = self.interface.get_key()
189
+ if key in [curses.erasechar(), 'KEY_BACKSPACE']:
190
+ buffer = buffer[:-1]
191
+ y, x = self.interface.scr.getyx()
192
+ if x:
193
+ self.interface.scr.delch(y, x - 1)
194
+ continue
195
+ elif (key != '\n' and
196
+ (len(key) > 1 or unicodedata.category(key) == 'Cc')):
197
198
sys.stdout.write(key)
199
# Include the \n in the buffer - raw_input() seems to deal with trailing
200
# linebreaks and will break if it gets an empty string.
0 commit comments