other: re-enable table scroll position

This commit is contained in:
ClementTsang 2020-12-25 14:34:25 -05:00
parent 2f0cecf817
commit 2bad8f2d72
2 changed files with 16 additions and 17 deletions

View file

@ -136,13 +136,13 @@ Hides the spacing between table headers and entries.\n\n",
"\
Completely hides the time scaling from being shown.\n\n",
);
// let show_table_scroll_position = Arg::with_name("show_table_scroll_position")
// .long("show_table_scroll_position")
// .help("Shows the scroll position tracker in table widgets")
// .long_help(
// "\
// Shows the list scroll position tracker in the widget title for table widgets.\n\n",
// );
let show_table_scroll_position = Arg::with_name("show_table_scroll_position")
.long("show_table_scroll_position")
.help("Shows the scroll position tracker in table widgets")
.long_help(
"\
Shows the list scroll position tracker in the widget title for table widgets.\n\n",
);
let left_legend = Arg::with_name("left_legend")
.short("l")
.long("left_legend")
@ -374,7 +374,7 @@ Defaults to showing the process widget in tree mode.\n\n",
.arg(hide_avg_cpu)
.arg(hide_table_gap)
.arg(hide_time)
// .arg(show_table_scroll_position)
.arg(show_table_scroll_position)
.arg(left_legend)
// .arg(no_write)
.arg(rate)

View file

@ -977,14 +977,13 @@ fn get_is_default_tree(matches: &clap::ArgMatches<'static>, config: &Config) ->
false
}
// FIXME: Re-enable this for 0.6
fn get_show_table_scroll_position(_matches: &clap::ArgMatches<'static>, _config: &Config) -> bool {
// if matches.is_present("show_table_scroll_position") {
// return true;
// } else if let Some(flags) = &config.flags {
// if let Some(show_table_scroll_position) = flags.show_table_scroll_position {
// return show_table_scroll_position;
// }
// }
fn get_show_table_scroll_position(matches: &clap::ArgMatches<'static>, config: &Config) -> bool {
if matches.is_present("show_table_scroll_position") {
return true;
} else if let Some(flags) = &config.flags {
if let Some(show_table_scroll_position) = flags.show_table_scroll_position {
return show_table_scroll_position;
}
}
false
}