diff --git a/src/clap.rs b/src/clap.rs index 1e6d1087..93d3acb8 100644 --- a/src/clap.rs +++ b/src/clap.rs @@ -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) diff --git a/src/options.rs b/src/options.rs index f5edc46e..9a8de130 100644 --- a/src/options.rs +++ b/src/options.rs @@ -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 }