fix moving of cursor
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
66e418d3a3
commit
c55d3c610b
5
keys.go
5
keys.go
|
@ -30,9 +30,10 @@ func HandlerCursorDispenser(mod int) func(g *gocui.Gui, v *gocui.View) error {
|
|||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
mx, _ := v.Size()
|
||||
_, my := v.Size()
|
||||
cx, cy := v.Cursor()
|
||||
if cy == 0 || cx == mx {
|
||||
log.Printf("my: %d, cx: %d, cy: %d", my, cx, cy)
|
||||
if cy+mod < 0 || cy+mod == my {
|
||||
return nil
|
||||
}
|
||||
if err := v.SetCursor(cx, cy+mod); err != nil {
|
||||
|
|
Loading…
Reference in New Issue