Go to the location of the first blank on the given line, returning the index of the last non-blank character.
(self, y)
| 54 | self.maxx = maxx - 1 |
| 55 | |
| 56 | def _end_of_line(self, y): |
| 57 | """Go to the location of the first blank on the given line, |
| 58 | returning the index of the last non-blank character.""" |
| 59 | self._update_max_yx() |
| 60 | last = self.maxx |
| 61 | while True: |
| 62 | if curses.ascii.ascii(self.win.inch(y, last)) != curses.ascii.SP: |
| 63 | last = min(self.maxx, last+1) |
| 64 | break |
| 65 | elif last == 0: |
| 66 | break |
| 67 | last = last - 1 |
| 68 | return last |
| 69 | |
| 70 | def _insert_printable_char(self, ch): |
| 71 | self._update_max_yx() |
no test coverage detected