X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/blobdiff_plain/bff12eb1383898f758fcf19f3fc1a62846e4e963..f815c67002636dee0cf00ed5b5eaa0eef02aa7dc:/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