Removing Console.Writelines for debugging and modifying bounds chekcing

This commit is contained in:
v-alexjo
2016-01-06 10:44:57 -08:00
parent 1ffaf2d5b7
commit 939d03e03d
@@ -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();
}