Insert *char* at cursor position.
(self, char)
| 291 | self.stream.flush() |
| 292 | |
| 293 | def insert_char(self, char): |
| 294 | """Insert *char* at cursor position.""" |
| 295 | self.password.insert(self.cursor_pos, char) |
| 296 | self.cursor_pos += 1 |
| 297 | # Only refresh if inserting in middle. |
| 298 | if self.cursor_pos < len(self.password): |
| 299 | self.refresh_display() |
| 300 | else: |
| 301 | self.stream.write(self.echo_char) |
| 302 | self.stream.flush() |
| 303 | |
| 304 | def is_eol(self, char): |
| 305 | """Check if *char* is a line terminator.""" |
no test coverage detected