From c44c8c3d1f8e6109f50aca7dffddf1d7ad10900b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 13 Jul 2015 13:50:36 +0100 Subject: [PATCH] Use different variable for pipe command in/out text --- src/normal.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/normal.cc b/src/normal.cc index 0da98510c..86d3d416d 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -395,19 +395,19 @@ void pipe(Context& context, NormalParams) Vector strings; for (auto& sel : selections) { - auto str = content(buffer, sel); - bool insert_eol = str.back() != '\n'; + auto in = content(buffer, sel); + bool insert_eol = in.back() != '\n'; if (insert_eol) - str += '\n'; - str = ShellManager::instance().eval( - real_cmd, context, str, + in += '\n'; + auto out = ShellManager::instance().eval( + real_cmd, context, in, ShellManager::Flags::WaitForStdout, {}, EnvVarMap{}).first; if ((insert_eol or sel.max() == buffer.back_coord()) and - str.back() == '\n') - str = str.substr(0, str.length()-1).str(); - strings.push_back(std::move(str)); + out.back() == '\n') + out = out.substr(0, out.length()-1).str(); + strings.push_back(std::move(out)); } ScopedEdition edition(context); selections.insert(strings, InsertMode::Replace);