summaryrefslogtreecommitdiff
path: root/src/insert_completer.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/insert_completer.cc
parentb6f2b872b003639e3a596a2e4a1b817529ebd729 (diff)
Refactor regex uses, do not reference boost except in regex.hh
Diffstat (limited to 'src/insert_completer.cc')
-rw-r--r--src/insert_completer.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/insert_completer.cc b/src/insert_completer.cc
index 1e50d189..da374d27 100644
--- a/src/insert_completer.cc
+++ b/src/insert_completer.cc
@@ -7,6 +7,7 @@
#include "display_buffer.hh"
#include "face_registry.hh"
#include "file.hh"
+#include "regex.hh"
#include "user_interface.hh"
#include "window.hh"
#include "word_db.hh"
@@ -162,14 +163,14 @@ InsertCompletion complete_filename(const Buffer& buffer, ByteCoord cursor_pos,
InsertCompletion complete_option(const Buffer& buffer, ByteCoord cursor_pos,
OptionManager& options, StringView option_name)
{
- const StringList& opt = options[option_name].get<StringList>();;
+ const StringList& opt = options[option_name].get<StringList>();
if (opt.empty())
return {};
auto& desc = opt[0];
static const Regex re(R"((\d+)\.(\d+)(?:\+(\d+))?@(\d+))");
- boost::smatch match;
- if (boost::regex_match(desc.begin(), desc.end(), match, re))
+ MatchResults<String::const_iterator> match;
+ if (regex_match(desc.begin(), desc.end(), match, re))
{
ByteCoord coord{ str_to_int(match[1].str()) - 1, str_to_int(match[2].str()) - 1 };
if (not buffer.is_valid(coord))