diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-06-05 14:27:08 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-06-05 14:27:08 -0400 |
commit | 530973aea3fa46c469541bc291513a75e3aacd3e (patch) | |
tree | d31a6676038c7d7d6bba9a7feefadd71cebc0ecd /src/tab.rs | |
parent | 8799211cf9e7547416618725a86463444ed9e342 (diff) |
add support for displaying owner and group of files
Diffstat (limited to 'src/tab.rs')
-rw-r--r-- | src/tab.rs | 17 |
1 files changed, 4 insertions, 13 deletions
@@ -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) { |