mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-04 23:37:41 +02:00
Bump gocui
See https://github.com/jesseduffield/gocui/pull/80. This fixes selecting hunks in the staging view that are longer than the screen.
This commit is contained in:
parent
21b8b2827e
commit
5dbd91038a
2
go.mod
2
go.mod
@ -15,7 +15,7 @@ require (
|
|||||||
github.com/integrii/flaggy v1.4.0
|
github.com/integrii/flaggy v1.4.0
|
||||||
github.com/jesseduffield/generics v0.0.0-20250517122708-b0b4a53a6f5c
|
github.com/jesseduffield/generics v0.0.0-20250517122708-b0b4a53a6f5c
|
||||||
github.com/jesseduffield/go-git/v5 v5.14.1-0.20250407170251-e1a013310ccd
|
github.com/jesseduffield/go-git/v5 v5.14.1-0.20250407170251-e1a013310ccd
|
||||||
github.com/jesseduffield/gocui v0.3.1-0.20250522064656-07eb9218e08e
|
github.com/jesseduffield/gocui v0.3.1-0.20250529123049-319bd37ff248
|
||||||
github.com/jesseduffield/kill v0.0.0-20250101124109-e216ddbe133a
|
github.com/jesseduffield/kill v0.0.0-20250101124109-e216ddbe133a
|
||||||
github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5
|
github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5
|
||||||
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e
|
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e
|
||||||
|
4
go.sum
4
go.sum
@ -194,8 +194,8 @@ github.com/jesseduffield/generics v0.0.0-20250517122708-b0b4a53a6f5c h1:tC2Paiis
|
|||||||
github.com/jesseduffield/generics v0.0.0-20250517122708-b0b4a53a6f5c/go.mod h1:F2fEBk0ddf6ixrBrJjY7phfQ3hL9rXG0uSjvwYe50bE=
|
github.com/jesseduffield/generics v0.0.0-20250517122708-b0b4a53a6f5c/go.mod h1:F2fEBk0ddf6ixrBrJjY7phfQ3hL9rXG0uSjvwYe50bE=
|
||||||
github.com/jesseduffield/go-git/v5 v5.14.1-0.20250407170251-e1a013310ccd h1:ViKj6qth8FgcIWizn9KiACWwPemWSymx62OPN0tHT+Q=
|
github.com/jesseduffield/go-git/v5 v5.14.1-0.20250407170251-e1a013310ccd h1:ViKj6qth8FgcIWizn9KiACWwPemWSymx62OPN0tHT+Q=
|
||||||
github.com/jesseduffield/go-git/v5 v5.14.1-0.20250407170251-e1a013310ccd/go.mod h1:lRhCiBr6XjQrvcQVa+UYsy/99d3wMXn/a0nSQlhnhlA=
|
github.com/jesseduffield/go-git/v5 v5.14.1-0.20250407170251-e1a013310ccd/go.mod h1:lRhCiBr6XjQrvcQVa+UYsy/99d3wMXn/a0nSQlhnhlA=
|
||||||
github.com/jesseduffield/gocui v0.3.1-0.20250522064656-07eb9218e08e h1:NuSXZHAUSo+dSAYArlaDpmKgxVpojuKvNcRkYJcQxkY=
|
github.com/jesseduffield/gocui v0.3.1-0.20250529123049-319bd37ff248 h1:kFWTUOjkyuerq8L74MyTnpBvrBxPR4T5GpkOv/gr6/o=
|
||||||
github.com/jesseduffield/gocui v0.3.1-0.20250522064656-07eb9218e08e/go.mod h1:sLIyZ2J42R6idGdtemZzsiR3xY5EF0KsvYEGh3dQv3s=
|
github.com/jesseduffield/gocui v0.3.1-0.20250529123049-319bd37ff248/go.mod h1:sLIyZ2J42R6idGdtemZzsiR3xY5EF0KsvYEGh3dQv3s=
|
||||||
github.com/jesseduffield/kill v0.0.0-20250101124109-e216ddbe133a h1:UDeJ3EBk04bXDLOPvuqM3on8HvyJfISw0+UMqW+0a4g=
|
github.com/jesseduffield/kill v0.0.0-20250101124109-e216ddbe133a h1:UDeJ3EBk04bXDLOPvuqM3on8HvyJfISw0+UMqW+0a4g=
|
||||||
github.com/jesseduffield/kill v0.0.0-20250101124109-e216ddbe133a/go.mod h1:FSWDLKT0NQpntbDd1H3lbz51fhCVlMzy/J0S6nM727Q=
|
github.com/jesseduffield/kill v0.0.0-20250101124109-e216ddbe133a/go.mod h1:FSWDLKT0NQpntbDd1H3lbz51fhCVlMzy/J0S6nM727Q=
|
||||||
github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5 h1:CDuQmfOjAtb1Gms6a1p5L2P8RhbLUq5t8aL7PiQd2uY=
|
github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5 h1:CDuQmfOjAtb1Gms6a1p5L2P8RhbLUq5t8aL7PiQd2uY=
|
||||||
|
21
vendor/github.com/jesseduffield/gocui/gui.go
generated
vendored
21
vendor/github.com/jesseduffield/gocui/gui.go
generated
vendored
@ -1232,24 +1232,9 @@ func (g *Gui) draw(v *View) error {
|
|||||||
|
|
||||||
if g.Cursor {
|
if g.Cursor {
|
||||||
if curview := g.currentView; curview != nil {
|
if curview := g.currentView; curview != nil {
|
||||||
vMaxX, vMaxY := curview.Size()
|
vMaxX, vMaxY := curview.InnerSize()
|
||||||
if curview.cx < 0 {
|
if curview.cx >= 0 && curview.cx < vMaxX && curview.cy >= 0 && curview.cy < vMaxY {
|
||||||
curview.cx = 0
|
cx, cy := curview.x0+curview.cx+1, curview.y0+curview.cy+1
|
||||||
} else if curview.cx >= vMaxX {
|
|
||||||
curview.cx = vMaxX - 1
|
|
||||||
}
|
|
||||||
if curview.cy < 0 {
|
|
||||||
curview.cy = 0
|
|
||||||
} else if curview.cy >= vMaxY {
|
|
||||||
curview.cy = vMaxY - 1
|
|
||||||
}
|
|
||||||
|
|
||||||
gMaxX, gMaxY := g.Size()
|
|
||||||
cx, cy := curview.x0+curview.cx+1, curview.y0+curview.cy+1
|
|
||||||
// This test probably doesn't need to be here.
|
|
||||||
// tcell is hiding cursor by setting coordinates outside of screen.
|
|
||||||
// Keeping it here for now, as I'm not 100% sure :)
|
|
||||||
if cx >= 0 && cx < gMaxX && cy >= 0 && cy < gMaxY {
|
|
||||||
Screen.ShowCursor(cx, cy)
|
Screen.ShowCursor(cx, cy)
|
||||||
} else {
|
} else {
|
||||||
Screen.HideCursor()
|
Screen.HideCursor()
|
||||||
|
23
vendor/github.com/jesseduffield/gocui/view.go
generated
vendored
23
vendor/github.com/jesseduffield/gocui/view.go
generated
vendored
@ -562,29 +562,19 @@ func max(a, b int) int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetCursor sets the cursor position of the view at the given point,
|
// SetCursor sets the cursor position of the view at the given point,
|
||||||
// relative to the view. It checks if the position is valid.
|
// relative to the view. It is allowed to set the position to a point outside
|
||||||
|
// the visible portion of the view, or even outside the content of the view.
|
||||||
|
// Clients are responsible for clamping to valid positions.
|
||||||
func (v *View) SetCursor(x, y int) {
|
func (v *View) SetCursor(x, y int) {
|
||||||
maxX, maxY := v.InnerSize()
|
|
||||||
if x < 0 || x >= maxX || y < 0 || y >= maxY {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
v.cx = x
|
v.cx = x
|
||||||
v.cy = y
|
v.cy = y
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *View) SetCursorX(x int) {
|
func (v *View) SetCursorX(x int) {
|
||||||
maxX := v.InnerWidth()
|
|
||||||
if x < 0 || x >= maxX {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
v.cx = x
|
v.cx = x
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *View) SetCursorY(y int) {
|
func (v *View) SetCursorY(y int) {
|
||||||
maxY := v.InnerHeight()
|
|
||||||
if y < 0 || y >= maxY {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
v.cy = y
|
v.cy = y
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1685,10 +1675,11 @@ func (v *View) RenderTextArea() {
|
|||||||
func updatedCursorAndOrigin(prevOrigin int, size int, cursor int) (int, int) {
|
func updatedCursorAndOrigin(prevOrigin int, size int, cursor int) (int, int) {
|
||||||
var newViewCursor int
|
var newViewCursor int
|
||||||
newOrigin := prevOrigin
|
newOrigin := prevOrigin
|
||||||
|
usableSize := size - 1
|
||||||
|
|
||||||
if cursor > prevOrigin+size {
|
if cursor > prevOrigin+usableSize {
|
||||||
newOrigin = cursor - size
|
newOrigin = cursor - usableSize
|
||||||
newViewCursor = size
|
newViewCursor = usableSize
|
||||||
} else if cursor < prevOrigin {
|
} else if cursor < prevOrigin {
|
||||||
newOrigin = cursor
|
newOrigin = cursor
|
||||||
newViewCursor = 0
|
newViewCursor = 0
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -227,7 +227,7 @@ github.com/jesseduffield/go-git/v5/utils/merkletrie/internal/frame
|
|||||||
github.com/jesseduffield/go-git/v5/utils/merkletrie/noder
|
github.com/jesseduffield/go-git/v5/utils/merkletrie/noder
|
||||||
github.com/jesseduffield/go-git/v5/utils/sync
|
github.com/jesseduffield/go-git/v5/utils/sync
|
||||||
github.com/jesseduffield/go-git/v5/utils/trace
|
github.com/jesseduffield/go-git/v5/utils/trace
|
||||||
# github.com/jesseduffield/gocui v0.3.1-0.20250522064656-07eb9218e08e
|
# github.com/jesseduffield/gocui v0.3.1-0.20250529123049-319bd37ff248
|
||||||
## explicit; go 1.12
|
## explicit; go 1.12
|
||||||
github.com/jesseduffield/gocui
|
github.com/jesseduffield/gocui
|
||||||
# github.com/jesseduffield/kill v0.0.0-20250101124109-e216ddbe133a
|
# github.com/jesseduffield/kill v0.0.0-20250101124109-e216ddbe133a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user