Commit ec6ca3e authored and committed Jun 2, 2024 Unverified
1 parent 87e4885 commit ec6ca3e Copy full SHA for ec6ca3e
File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -379,7 +379,7 @@ impl std::str::FromStr for KeyEvent {
379
379
function if function. len ( ) > 1 && function. starts_with ( 'F' ) => {
380
380
let function: String = function. chars ( ) . skip ( 1 ) . collect ( ) ;
381
381
let function = str:: parse :: < u8 > ( & function) ?;
382
- ( function > 0 && function < 13 )
382
+ ( function > 0 && function < 25 )
383
383
. then_some ( KeyCode :: F ( function) )
384
384
. ok_or_else ( || anyhow ! ( "Invalid function key '{}'" , function) ) ?
385
385
}
@@ -682,7 +682,7 @@ mod test {
682
682
683
683
#[ test]
684
684
fn parsing_nonsensical_keys_fails ( ) {
685
- assert ! ( str :: parse:: <KeyEvent >( "F13 " ) . is_err( ) ) ;
685
+ assert ! ( str :: parse:: <KeyEvent >( "F25 " ) . is_err( ) ) ;
686
686
assert ! ( str :: parse:: <KeyEvent >( "F0" ) . is_err( ) ) ;
687
687
assert ! ( str :: parse:: <KeyEvent >( "aaa" ) . is_err( ) ) ;
688
688
assert ! ( str :: parse:: <KeyEvent >( "S-S-a" ) . is_err( ) ) ;
You can’t perform that action at this time.
0 commit comments