mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 17:08:21 +00:00
only switch when target is not-empty (#105)
This commit is contained in:
parent
2032182cf9
commit
ce45c886c1
1 changed files with 6 additions and 2 deletions
|
|
@ -366,12 +366,16 @@ impl Component for Status {
|
|||
})
|
||||
}
|
||||
keys::MOVE_DOWN
|
||||
if self.focus == Focus::WorkDir =>
|
||||
if self.focus == Focus::WorkDir
|
||||
&& !self.index.is_empty() =>
|
||||
{
|
||||
self.switch_focus(Focus::Stage)
|
||||
}
|
||||
|
||||
keys::MOVE_UP if self.focus == Focus::Stage => {
|
||||
keys::MOVE_UP
|
||||
if self.focus == Focus::Stage
|
||||
&& !self.index_wd.is_empty() =>
|
||||
{
|
||||
self.switch_focus(Focus::WorkDir)
|
||||
}
|
||||
_ => Ok(false),
|
||||
|
|
|
|||
Loading…
Reference in a new issue