summaryrefslogtreecommitdiffstats
path: root/src/tab.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2020-08-30 15:20:03 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2020-08-30 15:20:03 -0400
commite7218c81d90ae07d7f56dce0c3032db15b11d118 (patch)
tree63c3b63345ec73031b26c1b900957ad06b69aec6 /src/tab.rs
parenta592bfe51c0cbb7744f14586520827cb06da8c8d (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.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tab.rs b/src/tab.rs
index 0b47899..c311842 100644
--- a/src/tab.rs
+++ b/src/tab.rs
@@ -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())
}