diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-02-04 23:52:06 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-02-04 23:54:22 +0000 |
| commit | a8eddd03f0e328b08d23ec9f83c5c61e9a9b202a (patch) | |
| tree | 785b26eafd774e82a24ffca1c3b5cf9534e2a2b3 /src/selectors.hh | |
| parent | 80f7a350e41bdf9c3011bb1e5ce0cf23bd405b5e (diff) | |
String usage cleanups
Diffstat (limited to 'src/selectors.hh')
| -rw-r--r-- | src/selectors.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/selectors.hh b/src/selectors.hh index a75cb35b..dc28dfd8 100644 --- a/src/selectors.hh +++ b/src/selectors.hh @@ -289,7 +289,8 @@ Selection find_next_match(const Buffer& buffer, const Selection& sel, const Rege begin = ensure_char_start(buffer, matches[0].first); end = ensure_char_start(buffer, matches[0].second); for (auto& match : matches) - captures.emplace_back(match.first, match.second); + captures.push_back(buffer.string(match.first.coord(), + match.second.coord())); } if (not found or begin == buffer.end()) throw runtime_error(format("'{}': no matches found", regex.str())); |
