1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-23 22:24:51 +02:00

support scrolling left and right

This commit is contained in:
Jesse Duffield
2021-11-02 20:35:53 +11:00
parent f6ec7babf5
commit 37be9dbea1
16 changed files with 140 additions and 17 deletions

View File

@@ -475,9 +475,33 @@ func (v *View) SetOrigin(x, y int) error {
return nil
}
func (v *View) SetOriginX(x int) error {
if x < 0 {
return ErrInvalidPoint
}
v.ox = x
return nil
}
func (v *View) SetOriginY(y int) error {
if y < 0 {
return ErrInvalidPoint
}
v.oy = y
return nil
}
// Origin returns the origin position of the view.
func (v *View) Origin() (x, y int) {
return v.ox, v.oy
return v.OriginX(), v.OriginY()
}
func (v *View) OriginX() int {
return v.ox
}
func (v *View) OriginY() int {
return v.oy
}
// SetWritePos sets the write position of the view's internal buffer.

2
vendor/modules.txt vendored
View File

@@ -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/internal/frame
github.com/jesseduffield/go-git/v5/utils/merkletrie/noder
# github.com/jesseduffield/gocui v0.3.1-0.20211102081536-e4eee64f4d13
# github.com/jesseduffield/gocui v0.3.1-0.20211102093457-be3a05cf7131
## explicit
github.com/jesseduffield/gocui
# github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e