X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/bff12eb1383898f758fcf19f3fc1a62846e4e963..781bf3836a8fea4b73672809eb791c0ea0d038b8:/dot/ipython-key-bindings.py diff --git a/dot/ipython-key-bindings.py b/dot/ipython-key-bindings.py index 3f392fe..abb1b01 100644 --- a/dot/ipython-key-bindings.py +++ b/dot/ipython-key-bindings.py @@ -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