summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-10-13 13:12:33 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-10-13 13:14:23 +0100
commitfa85f0fc32b105bef5948585a7d7a38c2910854b (patch)
tree62df5d4c99b3ae89274c848895fa94445f870edb /src/normal.cc
parentb6f2b872b003639e3a596a2e4a1b817529ebd729 (diff)
Refactor regex uses, do not reference boost except in regex.hh
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/normal.cc b/src/normal.cc
index fbd23ae8..a5f75269 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -546,7 +546,7 @@ void regex_prompt(Context& context, const String prompt, T func)
context.push_jump();
func(str.empty() ? Regex{} : Regex{str}, event, context);
}
- catch (boost::regex_error& err)
+ catch (RegexError& err)
{
if (event == PromptEvent::Validate)
throw runtime_error("regex error: "_str + err.what());
@@ -607,7 +607,7 @@ void search_next(Context& context, int param)
select_next_match<direction, mode>(context.buffer(), context.selections(), ex);
} while (--param > 0);
}
- catch (boost::regex_error& err)
+ catch (RegexError& err)
{
throw runtime_error("regex error: "_str + err.what());
}
@@ -732,8 +732,8 @@ void keep(Context& context, int)
std::vector<Selection> keep;
for (auto& sel : context.selections())
{
- if (boost::regex_search(buffer.iterator_at(sel.min()),
- utf8::next(buffer.iterator_at(sel.max()), buffer.end()), ex) == matching)
+ if (regex_search(buffer.iterator_at(sel.min()),
+ utf8::next(buffer.iterator_at(sel.max()), buffer.end()), ex) == matching)
keep.push_back(sel);
}
if (keep.empty())