Return the 0-based index of the line break following p most immediately. p defaults to self.pos.
(self, p: int | None = None)
| 455 | return p + 1 |
| 456 | |
| 457 | def eol(self, p: int | None = None) -> int: |
| 458 | """Return the 0-based index of the line break following p most |
| 459 | immediately. |
| 460 | |
| 461 | p defaults to self.pos.""" |
| 462 | if p is None: |
| 463 | p = self.pos |
| 464 | b = self.buffer |
| 465 | while p < len(b) and b[p] != "\n": |
| 466 | p += 1 |
| 467 | return p |
| 468 | |
| 469 | def max_column(self, y: int) -> int: |
| 470 | """Return the last x-offset for line y""" |