projects
/
platform
/
core
/
dotnet
/
diagnostics.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
900eafb
)
Check CursorTop before changing CursorLeft to prevent ArgumentOutOfRangeException...
author
Hyungju Lee
<leee.lee@samsung.com>
Wed, 14 Sep 2022 22:08:38 +0000
(07:08 +0900)
committer
GitHub
<noreply@github.com>
Wed, 14 Sep 2022 22:08:38 +0000
(15:08 -0700)
* Catch ArgumentOutOfRangeException
dotnet-dump analyze causes an Exception when console top is -1
* Check CursorTop before changing CursorLeft
src/Microsoft.Diagnostics.Repl/ConsoleService.cs
patch
|
blob
|
history
diff --git
a/src/Microsoft.Diagnostics.Repl/ConsoleService.cs
b/src/Microsoft.Diagnostics.Repl/ConsoleService.cs
index c14fba57b7ced8c2a8cebed9e9d34f5b6b76dfc9..bb139a000cb0c56ee167cdf5164e056b3d9465de 100644
(file)
--- a/
src/Microsoft.Diagnostics.Repl/ConsoleService.cs
+++ b/
src/Microsoft.Diagnostics.Repl/ConsoleService.cs
@@
-267,7
+267,7
@@
namespace Microsoft.Diagnostics.Repl
Console.Write(m_clearLine);
- if (!m_outputRedirected) {
+ if (!m_outputRedirected
&& Console.CursorTop >= 0
) {
Console.CursorLeft = 0;
}
}
@@
-313,7
+313,7
@@
namespace Microsoft.Diagnostics.Repl
Console.Write("{0}{1}", prompt, text);
- if (!m_outputRedirected) {
+ if (!m_outputRedirected
&& Console.CursorTop >= 0
) {
Console.CursorLeft = prompt.Length + (m_cursorPosition - m_scrollPosition);
}
}