From 71987b18d472c1c32214b8e4b36c09a972c82c0c Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 19 Dec 2017 12:48:34 -0600 Subject: [PATCH] linenoise.cpp: allow completions from empty input Fixes #1742. --- src/linenoise/linenoise.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/linenoise/linenoise.cpp b/src/linenoise/linenoise.cpp index 8ee8984d6..c57505d2f 100644 --- a/src/linenoise/linenoise.cpp +++ b/src/linenoise/linenoise.cpp @@ -2587,13 +2587,6 @@ int InputBuffer::getInputLine(PromptBase& pi) { // ctrl-I/tab, command completion, needs to be before switch statement if (c == ctrlChar('I') && completionCallback) { - if (pos == 0) // SERVER-4967 -- in earlier versions, you could paste - // previous output - continue; // back into the shell ... this output may have leading - // tabs. - // This hack (i.e. what the old code did) prevents command completion - // on an empty line but lets users paste text with leading tabs. - killRing.lastAction = KillRing::actionOther; historyRecallMostRecent = false;