()
| 789 | return |
| 790 | |
| 791 | def input_auto_indent(): |
| 792 | last_index = readline.get_current_history_length() |
| 793 | last_line = readline.get_history_item(last_index) |
| 794 | if last_line: |
| 795 | if last_line.isspace(): |
| 796 | # If the last line is empty, we don't need to indent |
| 797 | return |
| 798 | |
| 799 | last_line = last_line.rstrip('\r\n') |
| 800 | indent = len(last_line) - len(last_line.lstrip()) |
| 801 | if last_line.endswith(":"): |
| 802 | indent += 4 |
| 803 | readline.insert_text(' ' * indent) |
| 804 | |
| 805 | completenames = self.completenames |
| 806 | try: |
nothing calls this directly
no test coverage detected