@@ -105,10 +105,8 @@ def make_default_commands() -> dict[CommandName, type[Command]]:
105105 (r"\C-k" , "kill-line" ),
106106 (r"\C-l" , "clear-screen" ),
107107 (r"\C-m" , "accept" ),
108- (r"\C-q" , "quoted-insert" ),
109108 (r"\C-t" , "transpose-characters" ),
110109 (r"\C-u" , "unix-line-discard" ),
111- (r"\C-v" , "quoted-insert" ),
112110 (r"\C-w" , "unix-word-rubout" ),
113111 (r"\C-x\C-u" , "upcase-region" ),
114112 (r"\C-y" , "yank" ),
@@ -142,7 +140,6 @@ def make_default_commands() -> dict[CommandName, type[Command]]:
142140 (r"\<down>" , "down" ),
143141 (r"\<left>" , "left" ),
144142 (r"\<right>" , "right" ),
145- (r"\<insert>" , "quoted-insert" ),
146143 (r"\<delete>" , "delete" ),
147144 (r"\<backspace>" , "backspace" ),
148145 (r"\M-\<backspace>" , "backward-kill-word" ),
@@ -464,9 +461,9 @@ def update_cursor(self) -> None:
464461 self .cxy = self .pos2xy (self .pos )
465462 self .console .move_cursor (* self .cxy )
466463
467- def after_command (self , cmd ) -> None :
464+ def after_command (self , cmd : Command ) -> None :
468465 """This function is called to allow post command cleanup."""
469- if getattr (cmd , "kills_digit_arg" , 1 ):
466+ if getattr (cmd , "kills_digit_arg" , True ):
470467 if self .arg is not None :
471468 self .dirty = True
472469 self .arg = None
@@ -537,7 +534,7 @@ def refresh(self) -> None:
537534 def do_cmd (self , cmd ) -> None :
538535 if isinstance (cmd [0 ], str ):
539536 cmd = self .commands .get (cmd [0 ], commands .invalid_command )(self , * cmd )
540- elif isinstance (cmd [0 ], type ):
537+ elif isinstance (cmd [0 ], type ) and issubclass ( cmd [ 0 ], commands . Command ) :
541538 cmd = cmd [0 ](self , * cmd )
542539 else :
543540 return # nothing to do
0 commit comments