Skip to content

Commit e74af57

Browse files
committed
Added some more keys to be read from key_dispatch, in awaiting of key action binding so we can clear up for the cool kids, how long can a commit message really be? Do we know that yet?
1 parent 24c4cf1 commit e74af57

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bpython/cli.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ def p_key(self):
13311331
self.complete()
13321332
return ''
13331333

1334-
elif self.c == chr(18): # C-r
1334+
elif self.c in key_dispatch['C-r']: # C-r
13351335
self.undo()
13361336
return ''
13371337

@@ -1359,30 +1359,30 @@ def p_key(self):
13591359
elif self.c in ("KEY_END", '^E', chr(5)): # end or ^E
13601360
self.end()
13611361

1362-
elif self.c in ('^K', chr(11)): # cut to buffer
1362+
elif self.c in key_dispatch['C-k']: # cut to buffer
13631363
self.cut_to_buffer()
13641364
return ''
13651365

1366-
elif self.c in ('^Y', chr(25)): # yank from buffer
1366+
elif self.c in key_dispatch['C-y']: # yank from buffer
13671367
self.yank_from_buffer()
13681368
return ''
13691369

1370-
elif self.c in ('^W', chr(23)): # C-w
1370+
elif self.c in key_dispatch['C-w']:
13711371
self.bs_word()
13721372
self.complete()
13731373
return ''
13741374

1375-
elif self.c in ('^U', chr(21)): # C-u
1375+
elif self.c in key_dispatch['C-u']:
13761376
self.clrtobol()
13771377
return ''
13781378

1379-
elif self.c in ('^L', chr(12)): # C-l
1379+
elif self.c in key_dispatch['C-l']:
13801380
self.s_hist = [self.s_hist[-1]]
13811381
self.highlighted_paren = None
13821382
self.redraw()
13831383
return ''
13841384

1385-
elif self.c in (chr(4), '^D'): # C-d
1385+
elif self.c in key_dispatch['C-d']:
13861386
if not self.s:
13871387
self.do_exit = True
13881388
return None

0 commit comments

Comments
 (0)