Skip to content

Commit ec6ca3e

Browse files
christianholmanmtoohey31
authored andcommittedJun 2, 2024
allow for higher F keys to be used (helix-editor#7672)
1 parent 87e4885 commit ec6ca3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎helix-view/src/input.rs

+2-2
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)
Please sign in to comment.