Go to a specified offset. Positive offests are from the beginning of the view, negative from the end of the view, so that 0 is the first flow, -1 is the last flow.
(self, offset: int)
| 261 | # Focus |
| 262 | @command.command("view.focus.go") |
| 263 | def go(self, offset: int) -> None: |
| 264 | """ |
| 265 | Go to a specified offset. Positive offests are from the beginning of |
| 266 | the view, negative from the end of the view, so that 0 is the first |
| 267 | flow, -1 is the last flow. |
| 268 | """ |
| 269 | if len(self) == 0: |
| 270 | return |
| 271 | if offset < 0: |
| 272 | offset = len(self) + offset |
| 273 | if offset < 0: |
| 274 | offset = 0 |
| 275 | if offset > len(self) - 1: |
| 276 | offset = len(self) - 1 |
| 277 | self.focus.flow = self[offset] |
| 278 | |
| 279 | @command.command("view.focus.next") |
| 280 | def focus_next(self) -> None: |
no outgoing calls