File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -152,10 +152,10 @@ func (view *issueView) HandleKeyEvent(ev *tcell.EventKey) {
152
152
if view .fuzzyFind != nil {
153
153
view .fuzzyFind .HandleKeyEvent (ev )
154
154
}
155
- if ev .Key () == tcell .KeyUp {
155
+ if ev .Key () == tcell .KeyUp || ev . Key () == tcell . KeyTab {
156
156
view .scrollY = app .ClampInt (view .scrollY - 1 , 0 , view .maxScrollY )
157
157
}
158
- if ev .Key () == tcell .KeyDown {
158
+ if ev .Key () == tcell .KeyDown || ev . Key () == tcell . KeyBacktab {
159
159
view .scrollY = app .ClampInt (view .scrollY + 1 , 0 , view .maxScrollY )
160
160
}
161
161
}
Original file line number Diff line number Diff line change @@ -294,6 +294,18 @@ func Test_fjiraIssueView_HandleKeyEvent(t *testing.T) {
294
294
295
295
// then
296
296
assert2 .Equal (t , 0 , view .scrollY )
297
+
298
+ // when
299
+ view .HandleKeyEvent (tcell .NewEventKey (tcell .KeyBacktab , 'k' , tcell .ModNone ))
300
+
301
+ // then
302
+ assert2 .Equal (t , 1 , view .scrollY )
303
+
304
+ // and when
305
+ view .HandleKeyEvent (tcell .NewEventKey (tcell .KeyTab , 'k' , tcell .ModNone ))
306
+
307
+ // then
308
+ assert2 .Equal (t , 0 , view .scrollY )
297
309
})
298
310
}
299
311
}
You can’t perform that action at this time.
0 commit comments