-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Strange right arrow completion #14137
Description
I don't really know how to explain a full reproducer for this because it depends on the history of things that I have typed into ipython. Right now I can reproduce this as follows but I am not sure what previous things I have done that cause this to happen.
First just setup a few pieces:
In [4]: solve = lambda *a, **kw: None
In [5]: syms = E = NoneNow I run this command:
In [6]: solve(E, syms)Now I want to rerun this but change it to solve(groebner(E), syms) so I follow these steps carefully:
Push <up>, then <home> then <right> 6 times and type groebner(. Now I have this:
In [7]: solve(groebner(E, syms)and my cursor is flashing on the E.
I want to add the closing bracket ) after the E so I press <right> and then something weird happens:
In [7]: solve(groebner(, syms, dict=True)E, syms)Somehow pressing <right> inserted the text , syms, dict=True) and then left my cursor at the end of that text.
Is this a bug? Have I perhaps somehow accidentally configured something that makes this happen?
Adding the text , syms, dict=True) is certainly something that I have previously done as an edit so maybe ipython "remembers" that somehow?
Note that if I change anything about this like if I delete the s from the start of the line then it does not happen. Somehow this is specific to the exact text that I am editing e.g. if I have this then I can use both <left> and <right> normally:
In [7]: olve(groebner(E, syms)
I think it is trying to complete from the history somehow e.g. if I have this:
In [7]: solve(groebner(E, syms),
then the completer offers:

It seems that the completion is being used when the cursor is not at the end of the line somehow.