diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-03-04 20:47:14 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-03-04 20:47:14 +0000 |
| commit | bc7c3987e157e544a0eaa897a337c20361cd2458 (patch) | |
| tree | cb80f3bb436f30d9fe8a6cb310da5feba18ef497 /src/normal.cc | |
| parent | c0e4268e1731f5730f0ba677d7109dda79386b54 (diff) | |
Convert CodepointPair to struct MatchingPair
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/normal.cc b/src/normal.cc index f587a513..06f71a13 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -908,9 +908,9 @@ void select_object(Context& context, NormalParams params) return select<mode>(context, std::bind(sel.func, _1, _2, flags)); } - static const struct + static constexpr struct { - CodepointPair pair; + MatchingPair pair; Codepoint name; } surrounding_pairs[] = { { { '(', ')' }, 'b' }, @@ -923,7 +923,7 @@ void select_object(Context& context, NormalParams params) }; for (auto& sur : surrounding_pairs) { - if (sur.pair.first == c or sur.pair.second == c or + if (sur.pair.opening == c or sur.pair.closing == c or (sur.name != 0 and sur.name == c)) return select<mode>(context, std::bind(select_surrounding, _1, _2, sur.pair, level, flags)); |
