aboutsummaryrefslogtreecommitdiffhomepage
path: root/fish_pager.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-09 01:39:08 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-09 01:39:08 -0800
commit7e1b15a0cc9521f2f1ea72f5e3c54c33fb36aab4 (patch)
treede6429e2a296d525281e5904ac4318b5979ac121 /fish_pager.cpp
parent19858c574d3da37d5bbeb5b7d1359cb29d980f05 (diff)
More changes to fish pager to fix regressions. It didn't actually work.
Diffstat (limited to 'fish_pager.cpp')
-rw-r--r--fish_pager.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fish_pager.cpp b/fish_pager.cpp
index 7fe88ddb..3881a708 100644
--- a/fish_pager.cpp
+++ b/fish_pager.cpp
@@ -901,14 +901,13 @@ static void join_completions( wcstring_list_t lst )
else
{
const wchar_t *old = lst.at(i).c_str();
- wchar_t *old_end = wcschr( old, COMPLETE_SEP );
+ const wchar_t *old_end = wcschr( old, COMPLETE_SEP );
if( old_end )
{
- *old_end = 0;
wcstring foo;
- foo.append(old);
+ foo.append(old, old_end - old);
foo.push_back(COMPLETE_ITEM_SEP);
foo.append(item);