aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Lib/curses/textpad.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2024-02-12 07:53:52 +0300
committerDaniil Cherednik <dcherednik@ydb.tech>2024-02-14 14:26:16 +0000
commit31f2a419764a8ba77c2a970cfc80056c6cd06756 (patch)
treec1995d239eba8571cefc640f6648e1d5dd4ce9e2 /contrib/tools/python3/src/Lib/curses/textpad.py
parentfe2ef02b38d9c85d80060963b265a1df9f38c3bb (diff)
downloadydb-31f2a419764a8ba77c2a970cfc80056c6cd06756.tar.gz
Update Python from 3.11.8 to 3.12.2
Diffstat (limited to 'contrib/tools/python3/src/Lib/curses/textpad.py')
-rw-r--r--contrib/tools/python3/src/Lib/curses/textpad.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/tools/python3/src/Lib/curses/textpad.py b/contrib/tools/python3/src/Lib/curses/textpad.py
index 2079953a06..aa87061b8d 100644
--- a/contrib/tools/python3/src/Lib/curses/textpad.py
+++ b/contrib/tools/python3/src/Lib/curses/textpad.py
@@ -102,7 +102,10 @@ class Textbox:
self._insert_printable_char(ch)
elif ch == curses.ascii.SOH: # ^a
self.win.move(y, 0)
- elif ch in (curses.ascii.STX,curses.KEY_LEFT, curses.ascii.BS,curses.KEY_BACKSPACE):
+ elif ch in (curses.ascii.STX,curses.KEY_LEFT,
+ curses.ascii.BS,
+ curses.KEY_BACKSPACE,
+ curses.ascii.DEL):
if x > 0:
self.win.move(y, x-1)
elif y == 0:
@@ -111,7 +114,7 @@ class Textbox:
self.win.move(y-1, self._end_of_line(y-1))
else:
self.win.move(y-1, self.maxx)
- if ch in (curses.ascii.BS, curses.KEY_BACKSPACE):
+ if ch in (curses.ascii.BS, curses.KEY_BACKSPACE, curses.ascii.DEL):
self.win.delch()
elif ch == curses.ascii.EOT: # ^d
self.win.delch()