diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-04 11:49:23 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-04 11:49:23 -0400 |
commit | 5a820a7a275bf5cacd2c545c0a0ac533789ec349 (patch) | |
tree | 7c12d22bd8b2c59c6125643386a6c7e12bbcfac8 /src/commands/cursor_move.rs | |
parent | 37fa8efbd8691d89fcd22727e3720621fff3680c (diff) |
fix cursor resetting to top when action is completed
- remove unused code
- clean up compiler warnings
Diffstat (limited to 'src/commands/cursor_move.rs')
-rw-r--r-- | src/commands/cursor_move.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/commands/cursor_move.rs b/src/commands/cursor_move.rs index 4bc16c7..57e629d 100644 --- a/src/commands/cursor_move.rs +++ b/src/commands/cursor_move.rs @@ -1,12 +1,11 @@ use crate::commands::{JoshutoCommand, JoshutoRunnable}; use crate::context::JoshutoContext; +use crate::preview; use crate::window::JoshutoView; -pub mod CursorMove { - use crate::context::JoshutoContext; - use crate::preview; - use crate::window::JoshutoView; +pub struct CursorMove; +impl CursorMove { pub fn cursor_move(mut new_index: usize, context: &mut JoshutoContext, view: &JoshutoView) { let curr_tab = &mut context.tabs[context.curr_tab_index]; |