mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-23 20:52:54 +03:00
fix scroll command enbled
This commit is contained in:
parent
10bb26e063
commit
6db11857e0
@ -163,8 +163,10 @@ impl App {
|
|||||||
.render(f, chunks[1]);
|
.render(f, chunks[1]);
|
||||||
|
|
||||||
let mut cmds = self.commit.commands();
|
let mut cmds = self.commit.commands();
|
||||||
|
if !self.commit.is_visible() {
|
||||||
cmds.extend(self.index.commands());
|
cmds.extend(self.index.commands());
|
||||||
cmds.extend(self.index_wd.commands());
|
cmds.extend(self.index_wd.commands());
|
||||||
|
}
|
||||||
cmds.extend(self.commands());
|
cmds.extend(self.commands());
|
||||||
|
|
||||||
self.draw_commands(f, chunks_main[2], cmds);
|
self.draw_commands(f, chunks_main[2], cmds);
|
||||||
@ -208,6 +210,7 @@ impl App {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !self.commit.is_visible() {
|
||||||
if self.index.event(ev) {
|
if self.index.event(ev) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -215,7 +218,6 @@ impl App {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if !self.commit.is_visible() {
|
|
||||||
if ev == Event::Key(KeyCode::Esc.into())
|
if ev == Event::Key(KeyCode::Esc.into())
|
||||||
|| ev == Event::Key(KeyCode::Char('q').into())
|
|| ev == Event::Key(KeyCode::Char('q').into())
|
||||||
{
|
{
|
||||||
|
@ -88,7 +88,7 @@ impl Component for IndexComponent {
|
|||||||
if self.focused {
|
if self.focused {
|
||||||
return vec![CommandInfo {
|
return vec![CommandInfo {
|
||||||
name: "Scroll [↑↓]".to_string(),
|
name: "Scroll [↑↓]".to_string(),
|
||||||
enabled: self.items.len() > 0,
|
enabled: self.items.len() > 1,
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user