File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -379,7 +379,7 @@ impl std::str::FromStr for KeyEvent {
379379 function if function. len ( ) > 1 && function. starts_with ( 'F' ) => {
380380 let function: String = function. chars ( ) . skip ( 1 ) . collect ( ) ;
381381 let function = str:: parse :: < u8 > ( & function) ?;
382- ( function > 0 && function < 13 )
382+ ( function > 0 && function < 25 )
383383 . then_some ( KeyCode :: F ( function) )
384384 . ok_or_else ( || anyhow ! ( "Invalid function key '{}'" , function) ) ?
385385 }
@@ -682,7 +682,7 @@ mod test {
682682
683683 #[ test]
684684 fn parsing_nonsensical_keys_fails ( ) {
685- assert ! ( str :: parse:: <KeyEvent >( "F13 " ) . is_err( ) ) ;
685+ assert ! ( str :: parse:: <KeyEvent >( "F25 " ) . is_err( ) ) ;
686686 assert ! ( str :: parse:: <KeyEvent >( "F0" ) . is_err( ) ) ;
687687 assert ! ( str :: parse:: <KeyEvent >( "aaa" ) . is_err( ) ) ;
688688 assert ! ( str :: parse:: <KeyEvent >( "S-S-a" ) . is_err( ) ) ;
You can’t perform that action at this time.
0 commit comments