From 70d42fc581f56d6e7718817dd32fc8cdcf7a6574 Mon Sep 17 00:00:00 2001 From: George Fleming Date: Tue, 16 Feb 2016 09:52:21 -0800 Subject: [PATCH] Move check of no match --- src/Microsoft.PowerShell.Linux.Host/readline.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.PowerShell.Linux.Host/readline.cs b/src/Microsoft.PowerShell.Linux.Host/readline.cs index 532d370141..75d7ee5a81 100644 --- a/src/Microsoft.PowerShell.Linux.Host/readline.cs +++ b/src/Microsoft.PowerShell.Linux.Host/readline.cs @@ -230,10 +230,11 @@ namespace Microsoft.PowerShell.Linux.Host if (previousKeyPress.Key != ConsoleKey.Tab) { cmdCompleteOpt = CommandCompletion.CompleteInput(this.buffer.ToString(), this.current, options, powershell); - if (cmdCompleteOpt.CompletionMatches.Count == 0) - { - return; - } + } + + if (cmdCompleteOpt.CompletionMatches.Count == 0) + { + return; } if (tabCompletionPos >= cmdCompleteOpt.CompletionMatches.Count)