aboutsummaryrefslogtreecommitdiffstats
path: root/epy.py
diff options
context:
space:
mode:
authorwustho <benawiadha@gmail.com>2020-04-18 10:03:38 +0700
committerwustho <benawiadha@gmail.com>2020-04-18 10:03:38 +0700
commited7e0794afd54a6ed4dda655dd1dcc202593191d (patch)
tree954dca4e76048e91ef1fc9aa7ccbf871b7ed93e5 /epy.py
parentb9aefba78d31697a99fe9a135bde25bfb0b1a90e (diff)
downloadepy-ed7e0794afd54a6ed4dda655dd1dcc202593191d.tar.gz
Add quick delete with 'D' in choice_win(True).
Diffstat (limited to 'epy.py')
-rwxr-xr-xepy.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/epy.py b/epy.py
index df44340..7bff4fa 100755
--- a/epy.py
+++ b/epy.py
@@ -534,6 +534,10 @@ def choice_win(allowdel=False):
index = 0
elif key_chwin in K["EndOfCh"]:
index = totlines - 1
+ elif key_chwin == ord("D") and allowdel:
+ return (0 if index == 0 else index-1), index
+ # chwin.redrawwin()
+ # chwin.refresh()
elif key_chwin == ord("d") and allowdel:
resp, _ = choice_win()(
lambda: ("Delete '{}'?".format(