(vloc buffer.Loc)
| 29 | } |
| 30 | |
| 31 | func (w *TabWindow) LocFromVisual(vloc buffer.Loc) int { |
| 32 | x := -w.hscroll |
| 33 | |
| 34 | for i, n := range w.Names { |
| 35 | x++ |
| 36 | s := util.CharacterCountInString(n) |
| 37 | if vloc.Y == w.Y && vloc.X < x+s { |
| 38 | return i |
| 39 | } |
| 40 | x += s |
| 41 | x += 3 |
| 42 | if x >= w.Width { |
| 43 | break |
| 44 | } |
| 45 | } |
| 46 | return -1 |
| 47 | } |
| 48 | |
| 49 | func (w *TabWindow) Scroll(amt int) { |
| 50 | w.hscroll += amt |
nothing calls this directly
no test coverage detected