1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Bump gocui

And adapt client code.
This commit is contained in:
Stefan Haller
2024-09-06 08:45:14 +02:00
parent 753b16b697
commit 5659f1f3e9
42 changed files with 490 additions and 143 deletions

View File

@ -325,8 +325,8 @@ func (g *Gui) SetView(name string, x0, y0, x1, y1 int, overlaps byte) (*View, er
newViewCursorX, newOriginX := updatedCursorAndOrigin(0, v.InnerWidth(), cursorX)
newViewCursorY, newOriginY := updatedCursorAndOrigin(0, v.InnerHeight(), cursorY)
_ = v.SetCursor(newViewCursorX, newViewCursorY)
_ = v.SetOrigin(newOriginX, newOriginY)
v.SetCursor(newViewCursorX, newViewCursorY)
v.SetOrigin(newOriginX, newOriginY)
}
}
@ -1204,9 +1204,7 @@ func (g *Gui) ForceRedrawViews(views ...*View) error {
}
for _, v := range views {
if err := v.draw(); err != nil {
return err
}
v.draw()
}
Screen.Show()
@ -1252,9 +1250,7 @@ func (g *Gui) draw(v *View) error {
Screen.HideCursor()
}
if err := v.draw(); err != nil {
return err
}
v.draw()
if v.Frame {
var fgColor, bgColor, frameColor Attribute
@ -1360,9 +1356,7 @@ func (g *Gui) onKey(ev *GocuiEvent) error {
}
}
if !IsMouseScrollKey(ev.Key) {
if err := v.SetCursor(newCx, newCy); err != nil {
return err
}
v.SetCursor(newCx, newCy)
if v.Editable {
v.TextArea.SetCursor2D(newX, newY)