Skip to content

Commit

Permalink
Fix asynchronous command implementations
Browse files Browse the repository at this point in the history
* Commands that read user input (such as `character-search` and
  interactive completion paging) were broken with the introduction of
  asynchronous operation. These commands now function as expected.
  • Loading branch information
murarth committed Sep 4, 2018
1 parent fbcbcc5 commit 4c41089
Show file tree
Hide file tree
Showing 4 changed files with 489 additions and 255 deletions.
3 changes: 2 additions & 1 deletion src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ impl<Term: Terminal> Interface<Term> {
/// To use the default terminal interface, call `Interface::new` instead.
pub fn with_term<T>(application: T, term: Term) -> io::Result<Interface<Term>>
where T: Into<Cow<'static, str>> {
let size = term.lock_write().size()?;
let read = Read::new(&term, application.into());

Ok(Interface{
term: term,
write: Mutex::new(Write::new()),
write: Mutex::new(Write::new(size)),
read: Mutex::new(read),
})
}
Expand Down
Loading

0 comments on commit 4c41089

Please sign in to comment.