diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-02-10 22:09:58 -0500 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-02-11 09:33:06 -0500 |
commit | daf9d7b9afec8c598c0974c5d92263c3af5facf0 (patch) | |
tree | 5273968eb2b2ffc412ebe1894a96d13c9ae57d09 /src/context.rs | |
parent | b09ecb650aa5805c7021ab76672dddc0a7b0bb52 (diff) |
progress on switching to tui-rs for ui
Diffstat (limited to 'src/context.rs')
-rw-r--r-- | src/context.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/context.rs b/src/context.rs index 8f2ce4a..37b9604 100644 --- a/src/context.rs +++ b/src/context.rs @@ -40,4 +40,9 @@ impl JoshutoContext { pub fn add_new_worker(&mut self, thread: IOWorkerThread) { self.worker_queue.push_back(thread); } + + pub fn push_tab(&mut self, tab: JoshutoTab) { + self.tabs.push(tab); + self.curr_tab_index = self.tabs.len() - 1; + } } |