chiark / gitweb /
Merge branch 'master' into fairchild
[profile] / dot / ipython-key-bindings.py
index 3f392fe4498d6418b1782c99c02fa89d48e2cd53..abb1b01befa5e37e0ec706be9391eb7bffcd4a43 100644 (file)
@@ -15,7 +15,8 @@ try: pt = ipy.pt_cli
 except AttributeError: pass
 else:
   reg = pt.application.key_bindings_registry
-  bind = PTK.key_binding.bindings.utils.create_handle_decorator(reg)
+  try: bind = reg.add_binding
+  except AttributeError: bind = PTK.key_binding.bindings.utils.create_handle_decorator(reg)
 
   def inhibit_history_search(buf, fn):
     searchp, searchtext = buf.enable_history_search, buf.history_search_text