diff options
author | Canop <cano.petrole@gmail.com> | 2020-07-02 13:13:16 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2020-07-02 13:13:16 +0200 |
commit | b013aef94ae0cf5ca78cc135b800b3824b00102c (patch) | |
tree | 880d5bb8b3a5c1325d1b1de38dd9e48a36746933 /src/browser/browser_state.rs | |
parent | da3f4340a8ac5380884b6b6304ee3f1976434878 (diff) |
add the `--git-status` launch option
Diffstat (limited to 'src/browser/browser_state.rs')
-rw-r--r-- | src/browser/browser_state.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/browser/browser_state.rs b/src/browser/browser_state.rs index dab6c85..bb9ced7 100644 --- a/src/browser/browser_state.rs +++ b/src/browser/browser_state.rs @@ -617,7 +617,16 @@ impl AppState for BrowserState { self.with_new_options(screen, &|o| o.show_git_file_info ^= true, bang, con) } Internal::toggle_git_status => { - self.with_new_options(screen, &|o| o.filter_by_git_status ^= true, bang, con) + self.with_new_options( + screen, &|o| { + if o.filter_by_git_status { + o.filter_by_git_status = false; + } else { + o.filter_by_git_status = true; + o.show_hidden = true; + } + }, bang, con + ) } Internal::toggle_perm => { self.with_new_options(screen, &|o| o.show_permissions ^= true, bang, con) |