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
{{ message }}
Repository navigation
InsertLineAbove moves cursor from second line to first after inserting line, when first line is blank. #1107
PSReadline 2.0.0-beta5
Terminal must be capable of triggering InsertLineAbove keybinding.
Steps to reproduce
Referencing #1081 (comment), trigger the keybinding for InsertLineAbove while sitting at the beginning of the second line. (activate it once, to get two lines, then press DOWN and activate it again)
Edit: The first line must be blank in order to demonstrate the issue.
Before:
Result is:
Anywhere else, the cursor will remain on the same line.
I have narrowed down where this is coming from, A PR will be forth coming.
An ArgumentOutOfRangeException is possible if the buffer is filled in this manner while the cursor is effectively on the first line of the input, due to the cursor attempting to move from the second line back to the first after it has already scrolled off the buffer.
changed the title [-]InsertLineAbove moves cursor from second line to first after inserting line[/-][+]InsertLineAbove moves cursor from second line to first after inserting line, when first line is blank.[/+]on Oct 20, 2019
Activity
msftrncs commentedon Oct 20, 2019
I have narrowed down where this is coming from, A PR will be forth coming.
An ArgumentOutOfRangeException is possible if the buffer is filled in this manner while the cursor is effectively on the first line of the input, due to the cursor attempting to move from the second line back to the first after it has already scrolled off the buffer.
/cc: Keith Hill (@rkeithhill)
[-]InsertLineAbove moves cursor from second line to first after inserting line[/-][+]InsertLineAbove moves cursor from second line to first after inserting line, when first line is blank.[/+]Correct InsertLineAbove from switching cursor line.
Correct skipping of checking first character in buffer for new lines.
Correct skipping of checking first character in buffer for new lines.
Correct skipping of checking first character in buffer for new lines.