aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-01-12 11:54:02 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-01-12 11:54:02 -0800
commite9c226b8bebe25f54d65a272ccfa7697980d6d28 (patch)
treec1657d3e771d9e749bfd2e44b9242157e4295487 /reader.cpp
parentaf9d611847e2eae38613280027d6dafc06c72565 (diff)
Fix for issue where completing in the middle of a command may append extra junk at the end of the completions in the list
Diffstat (limited to 'reader.cpp')
-rw-r--r--reader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/reader.cpp b/reader.cpp
index cd8eb333..392dee14 100644
--- a/reader.cpp
+++ b/reader.cpp
@@ -1648,7 +1648,7 @@ static bool handle_completions(const std::vector<completion_t> &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);
}
{