mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Removing Console.Writelines for debugging and modifying bounds chekcing
This commit is contained in:
@@ -250,22 +250,16 @@ namespace Microsoft.PowerShell.Linux.Host
|
||||
|
||||
try
|
||||
{
|
||||
Console.WriteLine("CompletionMatches {0}", cmdCompleteOpt.CompletionMatches.Count);
|
||||
Console.WriteLine("tabCompletionPos {0}", tabCompletionPos);
|
||||
if (tabCompletionPos > cmdCompleteOpt.CompletionMatches.Count || tabCompletionPos == cmdCompleteOpt.CompletionMatches.Count)
|
||||
{
|
||||
Console.WriteLine("in reset of tabCompleitonPos");
|
||||
tabCompletionPos = 0;
|
||||
{
|
||||
tabCompletionPos = 1;
|
||||
}
|
||||
|
||||
tabResult = cmdCompleteOpt.CompletionMatches[tabCompletionPos].CompletionText;
|
||||
|
||||
tabResult = cmdCompleteOpt.CompletionMatches[tabCompletionPos].CompletionText;
|
||||
}
|
||||
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("tabCompletionPos {0}", tabCompletionPos);
|
||||
Console.WriteLine("in exception with e= {0}", e);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -274,7 +268,6 @@ namespace Microsoft.PowerShell.Linux.Host
|
||||
//if there is a command for the user before the uncompleted option
|
||||
if (!String.IsNullOrEmpty(tabResult))
|
||||
{
|
||||
Console.WriteLine("in not null or empty");
|
||||
//handle file path slashes
|
||||
if (tabResult.Contains(".\\"))
|
||||
{
|
||||
@@ -282,8 +275,7 @@ namespace Microsoft.PowerShell.Linux.Host
|
||||
}
|
||||
|
||||
if (this.buffer.ToString().Contains(" "))
|
||||
{
|
||||
Console.WriteLine("the buffer contains a space");
|
||||
{
|
||||
var replaceIndex = cmdCompleteOpt.ReplacementIndex;
|
||||
string replaceBuffer = this.buffer.ToString();
|
||||
|
||||
@@ -306,8 +298,7 @@ namespace Microsoft.PowerShell.Linux.Host
|
||||
|
||||
|
||||
}
|
||||
BufferFromString(tabResult);
|
||||
Console.WriteLine("bufferfromstring is {0}", tabResult);
|
||||
BufferFromString(tabResult);
|
||||
this.Render();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user