Skip to content

Commit

Permalink
fix: do not clear buffer on save
Browse files Browse the repository at this point in the history
  • Loading branch information
kckeiks committed Jun 4, 2024
1 parent 1b5b7a0 commit e5f01d6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions etc/tui/src/components/profile/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl ProfileView {
let records = self.table.records().cloned().collect::<Vec<_>>();
let mut profile = self
.profile
.take()
.clone()
.expect("The view should laways have a profile to view");
// Update profile with the new rules.
profile.file_rules = records;
Expand Down Expand Up @@ -145,7 +145,13 @@ impl Component for ProfileView {
self.table.scroll_down();
Ok(Some(Action::Render))
},
Action::NavLeft | Action::NavRight => {
Action::NavLeft => {
self.clear();
Ok(None)
},
Action::NavRight => {
// Todo: update this after making a "wrapping" navigator or the big refactor.
#[cfg(feature = "logger")]
self.clear();
Ok(None)
},
Expand Down

0 comments on commit e5f01d6

Please sign in to comment.