From eff2a3c3a369b5c48fdd4f10236d18358bf00531 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Sat, 27 May 2017 16:29:24 -0700 Subject: [PATCH] fix bug in ~ completion Fix bug introduced by commit c114cbc9a that causes only the first match for a ~ completion to be available for selection. Fixes #4075 --- src/complete.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/complete.cpp b/src/complete.cpp index 8aaceec91..3ca2c8131 100644 --- a/src/complete.cpp +++ b/src/complete.cpp @@ -1207,14 +1207,12 @@ bool completer_t::try_complete_user(const wcstring &str) { wcstring desc = format_string(COMPLETE_USER_DESC, pw_name); append_completion(&this->completions, &pw_name[name_len], desc, COMPLETE_NO_SPACE); result = true; - break; } else if (wcsncasecmp(user_name, pw_name, name_len) == 0) { wcstring name = format_string(L"~%ls", pw_name); wcstring desc = format_string(COMPLETE_USER_DESC, pw_name); append_completion(&this->completions, name, desc, COMPLETE_REPLACES_TOKEN | COMPLETE_DONT_ESCAPE | COMPLETE_NO_SPACE); result = true; - break; } // If we've spent too much time (more than 200 ms) doing this give up.