| 925 | self.incr_search_mode = SearchMode.INCREMENTAL_SEARCH |
| 926 | |
| 927 | def readline_kill(self, e): |
| 928 | func = self.edit_keys[e] |
| 929 | self.cursor_offset, self.current_line, cut = func( |
| 930 | self.cursor_offset, self.current_line |
| 931 | ) |
| 932 | if self.last_events[-2] == e: # consecutive kill commands accumulative |
| 933 | if func.kills == "ahead": |
| 934 | self.cut_buffer += cut |
| 935 | elif func.kills == "behind": |
| 936 | self.cut_buffer = cut + self.cut_buffer |
| 937 | else: |
| 938 | raise ValueError("cut value other than 'ahead' or 'behind'") |
| 939 | else: |
| 940 | self.cut_buffer = cut |
| 941 | |
| 942 | def on_enter(self, new_code=True, reset_rl_history=True): |
| 943 | # so the cursor isn't touching a paren TODO: necessary? |