File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1353,7 +1353,7 @@ def p_key(self):
13531353 self .complete ()
13541354 return ''
13551355
1356- elif self .c == chr ( 18 ) : # C-r
1356+ elif self .c in key_dispatch [ 'C-r' ] : # C-r
13571357 self .undo ()
13581358 return ''
13591359
@@ -1381,30 +1381,30 @@ def p_key(self):
13811381 elif self .c in ("KEY_END" , '^E' , chr (5 )): # end or ^E
13821382 self .end ()
13831383
1384- elif self .c in ( '^K' , chr ( 11 )) : # cut to buffer
1384+ elif self .c in key_dispatch [ 'C-k' ] : # cut to buffer
13851385 self .cut_to_buffer ()
13861386 return ''
13871387
1388- elif self .c in ( '^Y' , chr ( 25 )) : # yank from buffer
1388+ elif self .c in key_dispatch [ 'C-y' ] : # yank from buffer
13891389 self .yank_from_buffer ()
13901390 return ''
13911391
1392- elif self .c in ( '^W' , chr ( 23 )): # C-w
1392+ elif self .c in key_dispatch [ ' C-w' ]:
13931393 self .bs_word ()
13941394 self .complete ()
13951395 return ''
13961396
1397- elif self .c in ( '^U' , chr ( 21 )): # C-u
1397+ elif self .c in key_dispatch [ ' C-u' ]:
13981398 self .clrtobol ()
13991399 return ''
14001400
1401- elif self .c in ( '^L' , chr ( 12 )): # C-l
1401+ elif self .c in key_dispatch [ ' C-l' ]:
14021402 self .s_hist = [self .s_hist [- 1 ]]
14031403 self .highlighted_paren = None
14041404 self .redraw ()
14051405 return ''
14061406
1407- elif self .c in ( chr ( 4 ), '^D' ): # C-d
1407+ elif self .c in key_dispatch [ ' C-d' ]:
14081408 if not self .s :
14091409 self .do_exit = True
14101410 return None
You can’t perform that action at this time.
0 commit comments