diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-08-30 15:20:03 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-08-30 15:20:03 -0400 |
commit | e7218c81d90ae07d7f56dce0c3032db15b11d118 (patch) | |
tree | 63c3b63345ec73031b26c1b900957ad06b69aec6 /src/tab.rs | |
parent | a592bfe51c0cbb7744f14586520827cb06da8c8d (diff) |
rework and fix issues
- fixed bug where io tasks would not run when user is in a textfield or prompt
- fixed bug where cut doesn't work
- rework structs to have private fields and public functions
- move IOWorkerObserver into seperate file
- move code from TuiView to TuiFolderView
Diffstat (limited to 'src/tab.rs')
-rw-r--r-- | src/tab.rs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -5,7 +5,7 @@ use crate::history::{DirectoryHistory, JoshutoHistory}; use crate::util::sort; pub struct JoshutoTab { - pub history: JoshutoHistory, + history: JoshutoHistory, curr_pwd: PathBuf, } @@ -29,6 +29,10 @@ impl JoshutoTab { self.curr_pwd = pwd.to_path_buf(); } + pub fn history_mut(&mut self) -> &mut JoshutoHistory { + &mut self.history + } + pub fn curr_list_ref(&self) -> Option<&JoshutoDirList> { self.history.get(self.pwd()) } |