summaryrefslogtreecommitdiffstats
path: root/src/tab.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2019-06-05 14:27:08 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2019-06-05 14:27:08 -0400
commit530973aea3fa46c469541bc291513a75e3aacd3e (patch)
treed31a6676038c7d7d6bba9a7feefadd71cebc0ecd /src/tab.rs
parent8799211cf9e7547416618725a86463444ed9e342 (diff)
add support for displaying owner and group of files
Diffstat (limited to 'src/tab.rs')
-rw-r--r--src/tab.rs17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/tab.rs b/src/tab.rs
index dd84ebc..94ff5aa 100644
--- a/src/tab.rs
+++ b/src/tab.rs
@@ -63,20 +63,11 @@ impl JoshutoTab {
pub fn refresh_file_status(&self, win: &JoshutoPanel) {
ncurses::werase(win.win);
ncurses::wmove(win.win, 0, 0);
-
- if let Some(entry) = self.curr_list.get_curr_ref() {
- ui::wprint_file_mode(win.win, entry);
- ncurses::waddstr(win.win, " ");
- if let Some(index) = self.curr_list.index {
- ncurses::waddstr(
- win.win,
- format!("{}/{} ", index + 1, self.curr_list.contents.len()).as_str(),
- );
- }
- ncurses::waddstr(win.win, " ");
- ui::wprint_file_info(win.win, entry);
+ if let Some(index) = self.curr_list.index {
+ let entry = &self.curr_list.contents[index];
+ let len = self.curr_list.contents.len();
+ ui::wprint_file_status(win, entry, index, len);
}
- win.queue_for_refresh();
}
pub fn refresh_path_status(&self, win: &JoshutoPanel, tilde_in_titlebar: bool) {