Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix one variant of the ArgumentOutOfRangeException issues #967

Merged
merged 2 commits into from
Jul 20, 2019

Conversation

daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Jul 16, 2019

Fix #919

This is one variant of the many ArgumentOutOfRangeException issues.
For this particular issue, the exception happens in one of the 3 conditions:

  1. Resize the windows, so the cursor appears in the next line (1 issue)
  2. Prompt string gets longer, and cause the cursor to appear in the next line. (3+ issues)
  3. Prompt function is changed and the new prompt string is too short. (3+ issues)

The fix is simple, just don't change the color of the prompt in those cases.


Issue #932 is an instance caused by changing the prompt function to produce a very short string: $.
Issue #849 is another instance caused by changing the prompt function to produce an extra new line at the end of the prompt message.
Issue #843 is another instance caused by changing the prompt function to produce extra new lines at the end of the prompt message.

I believe issue #863 happens because after cd into a nested folder, the prompt string is long enough to result in a wrapped line.
I believe issue #875 is also because cd results in a longer prompt string that gets wrapped into the next line.
Issue #843 also has a report about a long prompt causing the cursor to appear in its own line (line was wrapped).

Issue #786 is an instance where the cursor appears in its own line because of window resizing.

@daxian-dbw daxian-dbw requested a review from lzybkr July 16, 2019 22:14
@daxian-dbw
Copy link
Member Author

@lzybkr The change has been update to wrap back to the previous line. Please take another look and let me know your concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System.ArgumentOutOfRangeException throw when press quote key
3 participants