From 7e1b15a0cc9521f2f1ea72f5e3c54c33fb36aab4 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Thu, 9 Feb 2012 01:39:08 -0800 Subject: [PATCH] More changes to fish pager to fix regressions. It didn't actually work. --- fish_pager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fish_pager.cpp b/fish_pager.cpp index 7fe88ddbe..3881a7087 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);