diff options
Diffstat (limited to 'vendor/github.com/jesseduffield/gocui/view.go')
-rw-r--r-- | vendor/github.com/jesseduffield/gocui/view.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go index cd4c12f19..7dbe1519a 100644 --- a/vendor/github.com/jesseduffield/gocui/view.go +++ b/vendor/github.com/jesseduffield/gocui/view.go @@ -650,3 +650,14 @@ func (v *View) GetClickedTabIndex(x int) int { return 0 } + +func (v *View) SelectedLineIdx() int { + _, seletedLineIdx := v.SelectedPoint() + return seletedLineIdx +} + +func (v *View) SelectedPoint() (int, int) { + cx, cy := v.Cursor() + ox, oy := v.Origin() + return cx + ox, cy + oy +} |