From e44f95820ee182460bee2e7569ab4ecb1d444112 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 16 Mar 2017 23:08:10 +0000 Subject: Fixes some clang-tidy warning and add a few missing meta.hh include --- src/normal.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/normal.cc') diff --git a/src/normal.cc b/src/normal.cc index 03826487..119b91d1 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -730,9 +730,8 @@ void search(Context& context, NormalParams params) auto& buffer = context.buffer(); do { bool wrapped = false; - for (int i = 0; i < selections.size(); ++i) + for (auto& sel : selections) { - auto& sel = selections[i]; if (mode == SelectMode::Replace) sel = keep_direction(find_next_match(buffer, sel, regex, wrapped), sel); if (mode == SelectMode::Extend) @@ -1398,7 +1397,7 @@ void align(Context& context, NormalParams) CharCount spaces = (int)(targetcol - (tabs ? (tabcol + (int)tabs * tabstop) : inscol)); padstr = String{ '\t', tabs } + String{ ' ', spaces }; } - buffer.insert(insert_coord, std::move(padstr)); + buffer.insert(insert_coord, padstr); } selections.update(); } -- cgit v1.2.3