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 21, 2023
1 parent a0f0605 commit da9ac1b
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 @@ -103,6 +103,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 @@ -2,6 +2,8 @@
#include <vtbackend/Terminal.h>
#include <vtbackend/TerminalState.h>

#include <regex_dfa/RegExprParser.h>

namespace terminal
{

Expand All @@ -16,9 +18,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 @@ -18,6 +18,8 @@

#include <vtparser/Parser.h>

#include <regex_dfa/RegExpr.h>

#include <fmt/format.h>

#include <atomic>
Expand Down Expand Up @@ -194,7 +196,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 da9ac1b

Please sign in to comment.