Show More
@@ -195,11 +195,11 b' class TerminalInteractiveShell(InteractiveShell):' | |||
|
195 | 195 | b.insert_text('\n' + (' ' * (indent or 0))) |
|
196 | 196 | |
|
197 | 197 | @kbmanager.registry.add_binding(Keys.ControlC, filter=HasFocus(DEFAULT_BUFFER)) |
|
198 | def _(event): | |
|
198 | def _reset_buffer(event): | |
|
199 | 199 | event.current_buffer.reset() |
|
200 | 200 | |
|
201 | 201 | @kbmanager.registry.add_binding(Keys.ControlC, filter=HasFocus(SEARCH_BUFFER)) |
|
202 | def _(event): | |
|
202 | def _reset_search_buffer(event): | |
|
203 | 203 | if event.current_buffer.document.text: |
|
204 | 204 | event.current_buffer.reset() |
|
205 | 205 | else: |
@@ -208,7 +208,7 b' class TerminalInteractiveShell(InteractiveShell):' | |||
|
208 | 208 | supports_suspend = Condition(lambda cli: hasattr(signal, 'SIGTSTP')) |
|
209 | 209 | |
|
210 | 210 | @kbmanager.registry.add_binding(Keys.ControlZ, filter=supports_suspend) |
|
211 | def _(event): | |
|
211 | def _suspend_to_bg(event): | |
|
212 | 212 | event.cli.suspend_to_background() |
|
213 | 213 | |
|
214 | 214 | @Condition |
@@ -223,13 +223,13 b' class TerminalInteractiveShell(InteractiveShell):' | |||
|
223 | 223 | & insert_mode |
|
224 | 224 | & cursor_in_leading_ws |
|
225 | 225 | )) |
|
226 | def _(event): | |
|
226 | def _indent_buffer(event): | |
|
227 | 227 | event.current_buffer.insert_text(' ' * 4) |
|
228 | 228 | |
|
229 | 229 | # Pre-populate history from IPython's history database |
|
230 | 230 | history = InMemoryHistory() |
|
231 | 231 | last_cell = u"" |
|
232 | for _, _, cell in self.history_manager.get_tail(self.history_load_length, | |
|
232 | for __, ___, cell in self.history_manager.get_tail(self.history_load_length, | |
|
233 | 233 | include_latest=True): |
|
234 | 234 | # Ignore blank lines and consecutive duplicates |
|
235 | 235 | cell = cell.rstrip() |
General Comments 0
You need to be logged in to leave comments.
Login now