IndexOutOfRange or ArgumentOutOfRange exception when using bck-i-search with a buffer height of 1 #4139
Labels
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Needs-Triage 🔍
It's a new issue that core contributor team needs to triage.
Prerequisites
Exception report
Screenshot
Environment data
Steps to reproduce
Minimum reproducible example:
It could be a tab or pane with any amount of history (including no history). If using a tab instead of a pane, you'd just need to resize the whole window instead. After pressing Ctrl+r, it also doesn't make a difference what is typed before pressing enter. If, after pressing Ctrl+r, the pane is resized to not be the minimum, it will still have the same error.
If you press Ctrl+r first at a normal size, then resize to a height of 1, then press the Enter key, it will raise a different exception:
Expected behavior
I expect it to work like bck-i-search normally does.
Actual behavior
The above exception happens, and it doesn't search the command history either.
For example, if I open a new instance of PowerShell and type in
test
, then do Ctrl+r to initiate reverse i search, then type int
and press enter, it would normally say, "the term 'test' is not recognized ..." (as it should). If the buffer height is 1, it instead says, "the term 't' is not recognized ...".The text was updated successfully, but these errors were encountered: