Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Parpart <christian@parpart.family>
  • Loading branch information
christianparpart committed Aug 12, 2023
1 parent b9850ad commit eff4d78
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/vtbackend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ target_link_libraries(vtbackend PUBLIC
fmt::fmt-header-only
range-v3::range-v3
${LIBUNICODE_LIBS}
regex_dfa
vtparser
vtpty
)
Expand Down
6 changes: 3 additions & 3 deletions src/vtbackend/TerminalState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include <vtbackend/Terminal.h>
#include <vtbackend/TerminalState.h>

#include <regex_dfa/RegExprParser.h>

namespace terminal
{

Expand All @@ -29,9 +31,7 @@ TerminalState::TerminalState(Terminal& terminal):
te->discardImage(*image);
} },
hyperlinks { HyperlinkCache { 1024 } },
urlPattern { settings.urlPattern,
std::regex_constants::ECMAScript | std::regex_constants::optimize
| std::regex_constants::icase },
urlPattern { regex_dfa::RegExprParser {}.parse(settings.urlPattern) },
sequencer { terminal },
parser { std::ref(sequencer) },
viCommands { terminal },
Expand Down
4 changes: 3 additions & 1 deletion src/vtbackend/TerminalState.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

#include <vtparser/Parser.h>

#include <regex_dfa/RegExpr.h>

#include <fmt/format.h>

#include <atomic>
Expand Down Expand Up @@ -206,7 +208,7 @@ struct TerminalState
// Hyperlink related
//
HyperlinkStorage hyperlinks {};
std::regex urlPattern;
regex_dfa::RegExpr urlPattern;

std::string windowTitle {};
std::stack<std::string> savedWindowTitles {};
Expand Down

0 comments on commit eff4d78

Please sign in to comment.