From 4293cd640fefa8bdc9da9875b11255e835638105 2022-04-04 21:05:48 From: Blazej Michalik <6691643+MrMino@users.noreply.github.com> Date: 2022-04-04 21:05:48 Subject: [PATCH] Merge pull request #13624 from MrMino/fix-end-key Fix empty autosuggestions bugging out the end key --- diff --git a/IPython/terminal/shortcuts.py b/IPython/terminal/shortcuts.py index 3a0017c..615397a 100644 --- a/IPython/terminal/shortcuts.py +++ b/IPython/terminal/shortcuts.py @@ -271,7 +271,7 @@ def create_ipython_shortcuts(shell): def _apply_autosuggest(event): b = event.current_buffer suggestion = b.suggestion - if suggestion: + if suggestion is not None and suggestion.text: b.insert_text(suggestion.text) else: nc.end_of_line(event)