mirror of
https://github.com/atuinsh/atuin.git
synced 2024-12-23 23:50:02 +01:00
fix: adapt help to enter_accept
config (#2001)
This commit is contained in:
parent
754ddeaa8d
commit
467b575007
@ -677,7 +677,7 @@ impl State {
|
||||
let title = self.build_title();
|
||||
f.render_widget(title, header_chunks[0]);
|
||||
|
||||
let help = self.build_help();
|
||||
let help = self.build_help(settings);
|
||||
f.render_widget(help, header_chunks[1]);
|
||||
|
||||
let stats_tab = self.build_stats();
|
||||
@ -763,7 +763,7 @@ impl State {
|
||||
}
|
||||
|
||||
#[allow(clippy::unused_self)]
|
||||
fn build_help(&self) -> Paragraph {
|
||||
fn build_help(&self, settings: &Settings) -> Paragraph {
|
||||
match self.tab_index {
|
||||
// search
|
||||
0 => Paragraph::new(Text::from(Line::from(vec![
|
||||
@ -774,7 +774,11 @@ impl State {
|
||||
Span::raw(": edit"),
|
||||
Span::raw(", "),
|
||||
Span::styled("<enter>", Style::default().add_modifier(Modifier::BOLD)),
|
||||
Span::raw(": run"),
|
||||
Span::raw(if settings.enter_accept {
|
||||
": run"
|
||||
} else {
|
||||
": edit"
|
||||
}),
|
||||
Span::raw(", "),
|
||||
Span::styled("<ctrl-o>", Style::default().add_modifier(Modifier::BOLD)),
|
||||
Span::raw(": inspect"),
|
||||
|
Loading…
Reference in New Issue
Block a user