diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 08c4528..ef269a6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,7 @@ use linebuf::LineBuf; use raw::*; use crate::cursor::{Direction, move_cursor}; +use crate::run::CommandDispatch; macro_rules! print { ($($x:tt)*) => {{ @@ -54,6 +55,7 @@ pub struct Session { raw: ScopedRawMode, line: LineBuf, history: Vec<BString>, + dispatch: CommandDispatch, } fn event_loop() { @@ -68,6 +70,7 @@ fn event_loop() { raw, line: LineBuf::new(), history: Vec::new(), + dispatch: CommandDispatch::new(), }; print!("{PROMPT}"); @@ -97,7 +100,7 @@ fn event_loop() { if !line.is_empty() { print!("\r\n"); se.history.push(line.clone()); - run::run(&se, line); + run::run(&mut se, line); } } |
