`help_hide_remaps` -> `hide_remaps_in_help_menu`

pull/419/head
Tom van Dijk 3 years ago committed by Arijit Basu
parent 263eb5943a
commit b1ac4944ab

@ -29,11 +29,11 @@ Type: boolean
Set it to `true` if you want to enable a safety feature that will save you from
yourself when you type recklessly.
## help_hide_remaps
## hide_remaps_in_help_menu
Type: boolean
Set it to `true` if you want to hide all remaps in the help buffer, except one.
Set it to `true` if you want to hide all remaps in the help buffer.
## initial_layout

@ -228,7 +228,7 @@ pub struct GeneralConfig {
pub enable_recover_mode: bool,
#[serde(default)]
pub help_hide_remaps: bool,
pub hide_remaps_in_help_menu: bool,
#[serde(default)]
pub prompt: UiElement,

@ -20,7 +20,7 @@ xplr.config.general.enable_recover_mode = false
xplr.config.general.start_fifo = nil
------ Hide remaps in help menu
xplr.config.general.help_hide_remaps = false
xplr.config.general.hide_remaps_in_help_menu = false
------ Prompt
xplr.config.general.prompt.format = " "

@ -738,7 +738,7 @@ fn draw_help_menu<B: Backend>(
.map(|l| match l {
HelpMenuLine::Paragraph(p) => Row::new([Cell::from(p)].to_vec()),
HelpMenuLine::KeyMap(k, remaps, h) => Row::new({
if app.config.general.help_hide_remaps {
if app.config.general.hide_remaps_in_help_menu {
[Cell::from(k), Cell::from(h)].to_vec()
} else {
[Cell::from(k), Cell::from(remaps.join("|")), Cell::from(h)]
@ -753,7 +753,7 @@ fn draw_help_menu<B: Backend>(
config,
format!(" Help [{}{}] ", &app.mode.name, read_only_indicator(app)),
))
.widths(if app.config.general.help_hide_remaps {
.widths(if app.config.general.hide_remaps_in_help_menu {
&[TuiConstraint::Percentage(20), TuiConstraint::Percentage(80)]
} else {
&[

Loading…
Cancel
Save