1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-19 00:28:03 +02:00

another integration test

This commit is contained in:
Jesse Duffield
2022-08-08 21:32:58 +10:00
parent 77881a9c7d
commit 225c563c63
46 changed files with 326 additions and 26 deletions

View File

@ -465,6 +465,14 @@ func (v *View) Cursor() (x, y int) {
return v.cx, v.cy
}
func (v *View) CursorX() int {
return v.cx
}
func (v *View) CursorY() int {
return v.cy
}
// SetOrigin sets the origin position of the view's internal buffer,
// so the buffer starts to be printed from this point, which means that
// it is linked with the origin point of view. It can be used to
@ -1235,6 +1243,13 @@ func (v *View) SelectedLineIdx() int {
return seletedLineIdx
}
// expected to only be used in tests
func (v *View) SelectedLine() string {
line := v.lines[v.SelectedLineIdx()]
str := lineType(line).String()
return strings.Replace(str, "\x00", " ", -1)
}
func (v *View) SelectedPoint() (int, int) {
cx, cy := v.Cursor()
ox, oy := v.Origin()