Compare commits
5 Commits
d1053f687b
...
89a6f09a90
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89a6f09a90 | ||
|
|
7c03656dfe | ||
|
|
6681cc3c69 | ||
|
|
6518fd4b30 | ||
|
|
78cc3647c7 |
@@ -102,7 +102,7 @@ fn handle_message(
|
||||
/// This is useful to ultimately create a `Control` without the user having to
|
||||
/// input all of the character(s) needed.
|
||||
fn read_input(
|
||||
agent: Subject(Control),
|
||||
subject: Subject(Control),
|
||||
inject_input: Subject(Key),
|
||||
tap_input: Subject(List(String)),
|
||||
) -> Nil {
|
||||
@@ -111,13 +111,10 @@ fn read_input(
|
||||
Ok(_) | Error(_) -> []
|
||||
}
|
||||
|
||||
case
|
||||
let _ =
|
||||
key.read_input_until_key(buffer, tap_input)
|
||||
|> control.from_key
|
||||
{
|
||||
Error(_) -> Nil
|
||||
Ok(control) -> process.send(agent, control)
|
||||
}
|
||||
|> result.map(process.send(subject, _))
|
||||
|
||||
read_input(agent, inject_input, tap_input)
|
||||
read_input(subject, inject_input, tap_input)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user