Skip to content

Commit

Permalink
change: Don't jump to top when using sort shortcuts (#418)
Browse files Browse the repository at this point in the history
For consistency, we now don't automatically jump to the top of the list when using a sort shortcut. This behaviour already occurred with the sort menu and sorting by mouse clicks, so this is just now more consistent (and IMO less annoying, you can also always jump to the top via gg).
  • Loading branch information
ClementTsang authored Feb 19, 2021
1 parent e6c9187 commit f2975c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [#391](https://github.com/ClementTsang/bottom/pull/391): Show degree symbol on Celsius and Fahrenheit.

- [#418](https://github.com/ClementTsang/bottom/pull/418): Removed automatically jumping to the top of the list for process sort shortcuts. The standard behaviour is to now stay in place.

## Bug Fixes

- [#416](https://github.com/ClementTsang/bottom/pull/416): Fixes grouped vs ungrouped modes in the processes widget having inconsistent spacing.
Expand Down
4 changes: 0 additions & 4 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,6 @@ impl App {
.set_to_sorted_index_from_type(&processes::ProcessSorting::CpuPercent);
proc_widget_state.update_sorting_with_columns();
self.proc_state.force_update = Some(self.current_widget.widget_id);
self.skip_to_first();
}
}
}
Expand All @@ -1504,7 +1503,6 @@ impl App {
);
proc_widget_state.update_sorting_with_columns();
self.proc_state.force_update = Some(self.current_widget.widget_id);
self.skip_to_first();
}
}
}
Expand All @@ -1521,7 +1519,6 @@ impl App {
.set_to_sorted_index_from_type(&processes::ProcessSorting::Pid);
proc_widget_state.update_sorting_with_columns();
self.proc_state.force_update = Some(self.current_widget.widget_id);
self.skip_to_first();
}
}
}
Expand Down Expand Up @@ -1569,7 +1566,6 @@ impl App {
);
proc_widget_state.update_sorting_with_columns();
self.proc_state.force_update = Some(self.current_widget.widget_id);
self.skip_to_first();
}
}
}
Expand Down

0 comments on commit f2975c3

Please sign in to comment.