mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-03-25 22:01:14 +02:00
fix bug
This commit is contained in:
parent
308a3b51b3
commit
06ca71e955
2
go.mod
2
go.mod
@ -20,7 +20,7 @@ require (
|
|||||||
github.com/imdario/mergo v0.3.11
|
github.com/imdario/mergo v0.3.11
|
||||||
github.com/integrii/flaggy v1.4.0
|
github.com/integrii/flaggy v1.4.0
|
||||||
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4
|
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4
|
||||||
github.com/jesseduffield/gocui v0.3.1-0.20211102093457-be3a05cf7131
|
github.com/jesseduffield/gocui v0.3.1-0.20211102104458-40df0be5a474
|
||||||
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e
|
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e
|
||||||
github.com/jesseduffield/yaml v2.1.0+incompatible
|
github.com/jesseduffield/yaml v2.1.0+incompatible
|
||||||
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
|
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
|
||||||
|
4
go.sum
4
go.sum
@ -71,8 +71,8 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl
|
|||||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
|
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
|
||||||
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4 h1:GOQrmaE8i+KEdB8NzAegKYd4tPn/inM0I1uo0NXFerg=
|
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4 h1:GOQrmaE8i+KEdB8NzAegKYd4tPn/inM0I1uo0NXFerg=
|
||||||
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4/go.mod h1:nGNEErzf+NRznT+N2SWqmHnDnF9aLgANB1CUNEan09o=
|
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4/go.mod h1:nGNEErzf+NRznT+N2SWqmHnDnF9aLgANB1CUNEan09o=
|
||||||
github.com/jesseduffield/gocui v0.3.1-0.20211102093457-be3a05cf7131 h1:gojgTjfrDjDtpjcFeY/IVPGufQPOi/gTgg3wQ9FESmc=
|
github.com/jesseduffield/gocui v0.3.1-0.20211102104458-40df0be5a474 h1:4H/oJcUmwJpqyXzqfn+lsjQ/bjpm/HszzLrVbCjgqj4=
|
||||||
github.com/jesseduffield/gocui v0.3.1-0.20211102093457-be3a05cf7131/go.mod h1:znJuCDnF2Ph40YZSlBwdX/4GEofnIoWLGdT4mK5zRAU=
|
github.com/jesseduffield/gocui v0.3.1-0.20211102104458-40df0be5a474/go.mod h1:znJuCDnF2Ph40YZSlBwdX/4GEofnIoWLGdT4mK5zRAU=
|
||||||
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e h1:uw/oo+kg7t/oeMs6sqlAwr85ND/9cpO3up3VxphxY0U=
|
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e h1:uw/oo+kg7t/oeMs6sqlAwr85ND/9cpO3up3VxphxY0U=
|
||||||
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e/go.mod h1:u60qdFGXRd36jyEXxetz0vQceQIxzI13lIo3EFUDf4I=
|
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e/go.mod h1:u60qdFGXRd36jyEXxetz0vQceQIxzI13lIo3EFUDf4I=
|
||||||
github.com/jesseduffield/yaml v2.1.0+incompatible h1:HWQJ1gIv2zHKbDYNp0Jwjlj24K8aqpFHnMCynY1EpmE=
|
github.com/jesseduffield/yaml v2.1.0+incompatible h1:HWQJ1gIv2zHKbDYNp0Jwjlj24K8aqpFHnMCynY1EpmE=
|
||||||
|
@ -57,6 +57,9 @@ func GetCommitListDisplayStrings(
|
|||||||
pipeSetCache[cacheKey] = pipeSets
|
pipeSetCache[cacheKey] = pipeSets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if startIdx > len(commits) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
end := startIdx + length
|
end := startIdx + length
|
||||||
if end > len(commits)-1 {
|
if end > len(commits)-1 {
|
||||||
end = len(commits) - 1
|
end = len(commits) - 1
|
||||||
|
7
vendor/github.com/jesseduffield/gocui/view.go
generated
vendored
7
vendor/github.com/jesseduffield/gocui/view.go
generated
vendored
@ -218,7 +218,7 @@ func (v *View) SelectSearchResult(index int) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
y := v.searcher.searchPositions[index].y
|
y := v.searcher.searchPositions[index].y
|
||||||
v.FocusPoint(0, y)
|
v.FocusPoint(v.ox, y)
|
||||||
if v.searcher.onSelectItem != nil {
|
if v.searcher.onSelectItem != nil {
|
||||||
return v.searcher.onSelectItem(y, index, itemCount)
|
return v.searcher.onSelectItem(y, index, itemCount)
|
||||||
}
|
}
|
||||||
@ -227,10 +227,9 @@ func (v *View) SelectSearchResult(index int) error {
|
|||||||
|
|
||||||
func (v *View) Search(str string) error {
|
func (v *View) Search(str string) error {
|
||||||
v.writeMutex.Lock()
|
v.writeMutex.Lock()
|
||||||
defer v.writeMutex.Unlock()
|
|
||||||
|
|
||||||
v.searcher.search(str)
|
v.searcher.search(str)
|
||||||
v.updateSearchPositions()
|
v.updateSearchPositions()
|
||||||
|
|
||||||
if len(v.searcher.searchPositions) > 0 {
|
if len(v.searcher.searchPositions) > 0 {
|
||||||
// get the first result past the current cursor
|
// get the first result past the current cursor
|
||||||
currentIndex := 0
|
currentIndex := 0
|
||||||
@ -243,8 +242,10 @@ func (v *View) Search(str string) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
v.searcher.currentSearchIndex = currentIndex
|
v.searcher.currentSearchIndex = currentIndex
|
||||||
|
v.writeMutex.Unlock()
|
||||||
return v.SelectSearchResult(currentIndex)
|
return v.SelectSearchResult(currentIndex)
|
||||||
} else {
|
} else {
|
||||||
|
v.writeMutex.Unlock()
|
||||||
return v.searcher.onSelectItem(-1, -1, 0)
|
return v.searcher.onSelectItem(-1, -1, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -161,7 +161,7 @@ github.com/jesseduffield/go-git/v5/utils/merkletrie/filesystem
|
|||||||
github.com/jesseduffield/go-git/v5/utils/merkletrie/index
|
github.com/jesseduffield/go-git/v5/utils/merkletrie/index
|
||||||
github.com/jesseduffield/go-git/v5/utils/merkletrie/internal/frame
|
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/gocui v0.3.1-0.20211102093457-be3a05cf7131
|
# github.com/jesseduffield/gocui v0.3.1-0.20211102104458-40df0be5a474
|
||||||
## explicit
|
## explicit
|
||||||
github.com/jesseduffield/gocui
|
github.com/jesseduffield/gocui
|
||||||
# github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e
|
# github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e
|
||||||
|
Loading…
x
Reference in New Issue
Block a user