| 878 | self.add_normal_character(e) |
| 879 | |
| 880 | def get_last_word(self): |
| 881 | previous_word = _last_word(self.rl_history.entry) |
| 882 | word = _last_word(self.rl_history.back()) |
| 883 | line = self.current_line |
| 884 | self._set_current_line( |
| 885 | line[: len(line) - len(previous_word)] + word, |
| 886 | reset_rl_history=False, |
| 887 | ) |
| 888 | self._set_cursor_offset( |
| 889 | self.cursor_offset - len(previous_word) + len(word), |
| 890 | reset_rl_history=False, |
| 891 | ) |
| 892 | |
| 893 | def incremental_search(self, reverse=False, include_current=False): |
| 894 | if self.incr_search_mode == SearchMode.NO_SEARCH: |