diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-03-16 23:08:10 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-03-16 23:34:02 +0000 |
| commit | e44f95820ee182460bee2e7569ab4ecb1d444112 (patch) | |
| tree | eaf60c648066fef5b57512dc6ccc47d8095717e4 /src/normal.cc | |
| parent | 5f7464d90d0bfe641dd2c7bbbca6e78d92d9d818 (diff) | |
Fixes some clang-tidy warning and add a few missing meta.hh include
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 5 |
1 files changed, 2 insertions, 3 deletions
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<direction>(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(); } |
