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