Skip to content

Commit 2032182

Browse files
author
Stephan Dilly
committed
arrow keys on end of file list switches focus (closes #105)
1 parent aa79b92 commit 2032182

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
### Changed
1010
- changed hotkeys for selecting stage/workdir (**[w] / [s]** now to change between workdir and stage) and added hotkeys (`[1234]`) to switch to tabs directly ([#92](https://github.com/extrawurst/gitui/issues/92))
11+
- `arrow-up`/`down` on bottom/top of status file list switches focus ([#105](https://github.com/extrawurst/gitui/issues/105))
1112

1213
## [0.5.0] - 2020-06-01
1314

src/tabs/status.rs

+9
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,15 @@ impl Component for Status {
365365
DiffTarget::WorkingDir => Focus::WorkDir,
366366
})
367367
}
368+
keys::MOVE_DOWN
369+
if self.focus == Focus::WorkDir =>
370+
{
371+
self.switch_focus(Focus::Stage)
372+
}
373+
374+
keys::MOVE_UP if self.focus == Focus::Stage => {
375+
self.switch_focus(Focus::WorkDir)
376+
}
368377
_ => Ok(false),
369378
};
370379
}

0 commit comments

Comments
 (0)