Clicking tabbar arrow scrolls and fix multicursor

Closes #1503
This commit is contained in:
Zachary Yedidia
2020-02-12 13:05:15 -05:00
parent bf1258578c
commit bad78797bb
5 changed files with 27 additions and 18 deletions

View File

@@ -104,6 +104,13 @@ func (t *TabList) HandleEvent(event tcell.Event) {
mx, my := e.Position()
switch e.Buttons() {
case tcell.Button1:
if my == t.Y && mx == 0 {
t.Scroll(-4)
return
} else if my == t.Y && mx == t.Width-1 {
t.Scroll(4)
return
}
if len(t.List) > 1 {
ind := t.LocFromVisual(buffer.Loc{mx, my})
if ind != -1 {