From e9c226b8bebe25f54d65a272ccfa7697980d6d28 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 12 Jan 2013 11:54:02 -0800 Subject: [PATCH] Fix for issue where completing in the middle of a command may append extra junk at the end of the completions in the list https://github.com/fish-shell/fish-shell/issues/301 --- reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reader.cpp b/reader.cpp index cd8eb333b..392dee140 100644 --- a/reader.cpp +++ b/reader.cpp @@ -1648,7 +1648,7 @@ static bool handle_completions(const std::vector &comp) { // append just the end of the string prefix = wcstring(&ellipsis_char, 1); - prefix.append(data->command_line, prefix_start + len - PREFIX_MAX_LEN - 1, wcstring::npos); + prefix.append(data->command_line, prefix_start + len - PREFIX_MAX_LEN - 1, PREFIX_MAX_LEN); } {