From: Mark Wooding Date: Wed, 30 May 2018 14:55:03 +0000 (+0100) Subject: dot/ipython-key-bindings.py: Fix because IPython is now (fr)agile. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/a894ae88f9bf8b8b7c4c0c6c17972c4bbe21874e dot/ipython-key-bindings.py: Fix because IPython is now (fr)agile. --- 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