(buffer, document, shell)
| 96 | |
| 97 | |
| 98 | def reformat_text_before_cursor(buffer, document, shell): |
| 99 | text = buffer.delete_before_cursor(len(document.text[:document.cursor_position])) |
| 100 | try: |
| 101 | formatted_text = shell.reformat_handler(text) |
| 102 | buffer.insert_text(formatted_text) |
| 103 | except Exception as e: |
| 104 | buffer.insert_text(text) |
| 105 | |
| 106 | |
| 107 | def newline_or_execute_outer(shell): |
no outgoing calls
no test coverage detected