You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a multi-line command is recalled from history, the display is incorrect and the arrow keys do not work as expected. It looks like the newline characters aren't being taken into account when calculating cursor position, line length, etc.
To reproduce, the easiest way is to use IPython.
>ipython --TerminalInteractiveShell.multiline_history=True
Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 2.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: for i in range(3):
...: print(i)
...:
0
1
2
In [2]:
Do you really want to exit ([y]/n)?
PS 21:09 [Git: master] [00:17] C:\Work\Projects\ipython-pfm
>ipython --TerminalInteractiveShell.multiline_history=True
Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 2.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: for i in range(3):
print(i)
Note that you need to quit and re-enter IPython, because the individual lines are recalled during the current session. It's only from a new session that the history is multi-line.
In the final line (In[1] of the new session) I hit up arrow. The line was displayed, but the cursor was on the first line, 14 characters to the right of the colon. It could be moved left or right, but not onto the second line. Typing appears in the expected place on the second line - it's the place the cursor is displayed that is wrong, not the editing.
The text was updated successfully, but these errors were encountered:
When a multi-line command is recalled from history, the display is incorrect and the arrow keys do not work as expected. It looks like the newline characters aren't being taken into account when calculating cursor position, line length, etc.
To reproduce, the easiest way is to use IPython.
Note that you need to quit and re-enter IPython, because the individual lines are recalled during the current session. It's only from a new session that the history is multi-line.
In the final line (
In[1]
of the new session) I hit up arrow. The line was displayed, but the cursor was on the first line, 14 characters to the right of the colon. It could be moved left or right, but not onto the second line. Typing appears in the expected place on the second line - it's the place the cursor is displayed that is wrong, not the editing.The text was updated successfully, but these errors were encountered: