mirror of
https://github.com/MichaelMure/git-bug.git
synced 2025-01-06 01:44:27 +03:00
termui: fix left/right unnecessarely moving up/down
This commit is contained in:
parent
90f235b393
commit
c93c0221ca
@ -523,18 +523,28 @@ func (sb *showBug) left(g *gocui.Gui, v *gocui.View) error {
|
|||||||
if sb.isOnSide {
|
if sb.isOnSide {
|
||||||
sb.isOnSide = false
|
sb.isOnSide = false
|
||||||
sb.selected = ""
|
sb.selected = ""
|
||||||
|
return sb.selectNext(g, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
return sb.selectNext(g, v)
|
if sb.selected == "" {
|
||||||
|
return sb.selectNext(g, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sb *showBug) right(g *gocui.Gui, v *gocui.View) error {
|
func (sb *showBug) right(g *gocui.Gui, v *gocui.View) error {
|
||||||
if !sb.isOnSide {
|
if !sb.isOnSide {
|
||||||
sb.isOnSide = true
|
sb.isOnSide = true
|
||||||
sb.selected = ""
|
sb.selected = ""
|
||||||
|
return sb.selectNext(g, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
return sb.selectNext(g, v)
|
if sb.selected == "" {
|
||||||
|
return sb.selectNext(g, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sb *showBug) focusView(g *gocui.Gui) error {
|
func (sb *showBug) focusView(g *gocui.Gui) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user