Skip to content

Commit a349fdb

Browse files
christianholmanSchuyler Mortimer
authored andcommitted
allow for higher F keys to be used (helix-editor#7672)
1 parent e5a0637 commit a349fdb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

helix-view/src/input.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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());

0 commit comments

Comments
 (0)